quadratic_formCounterexamples.QuadraticForm

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -29,8 +29,8 @@ namespace Counterexample
 
 /-- The bilinear form we will use as a counterexample, over some field `F` of characteristic two. -/
 def b : BilinForm F (F × F) :=
-  BilinForm.linMulLin (LinearMap.fst _ _ _) (LinearMap.snd _ _ _) +
-    BilinForm.linMulLin (LinearMap.snd _ _ _) (LinearMap.fst _ _ _)
+  LinearMap.BilinForm.linMulLin (LinearMap.fst _ _ _) (LinearMap.snd _ _ _) +
+    LinearMap.BilinForm.linMulLin (LinearMap.snd _ _ _) (LinearMap.fst _ _ _)
 #align counterexample.B Counterexample.b
 
 @[simp]
@@ -44,7 +44,7 @@ theorem isSymm_b : (b F).IsSymm := fun x y => by simp [mul_comm, add_comm]
 theorem isAlt_b : (b F).IsAlt := fun x => by simp [mul_comm, CharTwo.add_self_eq_zero (x.1 * x.2)]
 #align counterexample.is_alt_B Counterexample.isAlt_b
 
-theorem b_ne_zero : b F ≠ 0 := fun h => by simpa using BilinForm.congr_fun h (1, 0) (1, 1)
+theorem b_ne_zero : b F ≠ 0 := fun h => by simpa using LinearMap.BilinForm.congr_fun h (1, 0) (1, 1)
 #align counterexample.B_ne_zero Counterexample.b_ne_zero
 
 /-- `bilin_form.to_quadratic_form` is not injective on symmetric bilinear forms.
Diff
@@ -5,7 +5,7 @@ Authors: Eric Wieser
 -/
 import LinearAlgebra.QuadraticForm.Basic
 import Algebra.CharP.Two
-import Data.Zmod.Basic
+import Data.ZMod.Basic
 
 #align_import quadratic_form from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
 
Diff
@@ -60,7 +60,7 @@ theorem BilinForm.not_injOn_toQuadraticForm_isSymm.{u} :
   let F := ULift.{u} (ZMod 2)
   apply B_ne_zero F
   apply h (is_symm_B F) is_symm_zero
-  rw [BilinForm.toQuadraticForm_zero, BilinForm.toQuadraticForm_eq_zero]
+  rw [LinearMap.BilinForm.toQuadraticForm_zero, LinearMap.BilinForm.toQuadraticForm_eq_zero]
   exact is_alt_B F
 #align counterexample.bilin_form.not_inj_on_to_quadratic_form_is_symm Counterexample.BilinForm.not_injOn_toQuadraticForm_isSymm
 
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2023 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 -/
-import Mathbin.LinearAlgebra.QuadraticForm.Basic
-import Mathbin.Algebra.CharP.Two
-import Mathbin.Data.Zmod.Basic
+import LinearAlgebra.QuadraticForm.Basic
+import Algebra.CharP.Two
+import Data.Zmod.Basic
 
 #align_import quadratic_form from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2023 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
-
-! This file was ported from Lean 3 source module quadratic_form
-! leanprover-community/mathlib commit 08b081ea92d80e3a41f899eea36ef6d56e0f1db0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.LinearAlgebra.QuadraticForm.Basic
 import Mathbin.Algebra.CharP.Two
 import Mathbin.Data.Zmod.Basic
 
+#align_import quadratic_form from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
+
 /-!
 # `quadratic_form R M` and `subtype bilin_form.is_symm` are distinct notions in characteristic 2
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 
 ! This file was ported from Lean 3 source module quadratic_form
-! leanprover-community/mathlib commit 328375597f2c0dd00522d9c2e5a33b6a6128feeb
+! leanprover-community/mathlib commit 08b081ea92d80e3a41f899eea36ef6d56e0f1db0
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.Data.Zmod.Basic
 /-!
 # `quadratic_form R M` and `subtype bilin_form.is_symm` are distinct notions in characteristic 2
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 The main result of this file is `bilin_form.not_inj_on_to_quadratic_form_is_symm`.
 
 The counterexample we use is $B (x, y) (x', y') ↦ xy' + x'y$ where `x y x' y' : zmod 2`.

Changes in mathlib4

mathlib3
mathlib4
refactor(LinearAlgebra/QuadraticForm): Replace BilinForm with a scalar valued bi LinearMap (#10238)

Following on from #10097, which converted the companion of a quadratic form with a bilinear map, this PR replaces a number of results about quadratic forms and bilinear forms with results about quadratic forms and scalar valued bilinear maps. The long term aim is to be able to consider quadratic maps.

The main change is to LinearAlgebra/QuadraticForm/Basic, but this necessitates changes throughout LinearAlgebra/QuadraticForm/. Minor changes are also required elsewhere:

  • LinearAlgebra/CliffordAlgebra/
  • LinearAlgebra/Matrix/PosDef
  • LinearAlgebra/SesquilinearForm
  • A number of additional results about tensor products and linear maps are also required.

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Christopher Hoskin <christopher.hoskin@overleaf.com>

Diff
@@ -10,9 +10,9 @@ import Mathlib.Data.ZMod.Basic
 #align_import quadratic_form from "leanprover-community/mathlib"@"328375597f2c0dd00522d9c2e5a33b6a6128feeb"
 
 /-!
-# `QuadraticForm R M` and `Subtype BilinForm.IsSymm` are distinct notions in characteristic 2
+# `QuadraticForm R M` and `Subtype LinearMap.IsSymm` are distinct notions in characteristic 2
 
-The main result of this file is `BilinForm.not_injOn_toQuadraticForm_isSymm`.
+The main result of this file is `LinearMap.BilinForm.not_injOn_toQuadraticForm_isSymm`.
 
 The counterexample we use is $B (x, y) (x', y') ↦ xy' + x'y$ where `x y x' y' : ZMod 2`.
 -/
@@ -20,7 +20,9 @@ The counterexample we use is $B (x, y) (x', y') ↦ xy' + x'y$ where `x y x' y'
 
 variable (F : Type*) [Nontrivial F] [CommRing F] [CharP F 2]
 
-open BilinForm
+open LinearMap
+open LinearMap.BilinForm
+open LinearMap (BilinForm)
 
 namespace Counterexample
 
@@ -28,8 +30,7 @@ set_option linter.uppercaseLean3 false
 
 /-- The bilinear form we will use as a counterexample, over some field `F` of characteristic two. -/
 def B : BilinForm F (F × F) :=
-  BilinForm.linMulLin (LinearMap.fst _ _ _) (LinearMap.snd _ _ _) +
-    BilinForm.linMulLin (LinearMap.snd _ _ _) (LinearMap.fst _ _ _)
+  (mul F F).compl₁₂ (fst _ _ _) (snd _ _ _) + (mul F F).compl₁₂ (snd _ _ _) (fst _ _ _)
 #align counterexample.B Counterexample.B
 
 @[simp]
@@ -43,22 +44,22 @@ theorem isSymm_B : (B F).IsSymm := fun x y => by simp [mul_comm, add_comm]
 theorem isAlt_B : (B F).IsAlt := fun x => by simp [mul_comm, CharTwo.add_self_eq_zero (x.1 * x.2)]
 #align counterexample.is_alt_B Counterexample.isAlt_B
 
-theorem B_ne_zero : B F ≠ 0 := fun h => by simpa using BilinForm.congr_fun h (1, 0) (1, 1)
+theorem B_ne_zero : B F ≠ 0 := fun h => by simpa using LinearMap.congr_fun₂ h (1, 0) (1, 1)
 #align counterexample.B_ne_zero Counterexample.B_ne_zero
 
-/-- `BilinForm.toQuadraticForm` is not injective on symmetric bilinear forms.
+/-- `LinearMap.BilinForm.toQuadraticForm` is not injective on symmetric bilinear forms.
 
 This disproves a weaker version of `QuadraticForm.associated_left_inverse`.
 -/
-theorem BilinForm.not_injOn_toQuadraticForm_isSymm.{u} :
+theorem LinearMap.BilinForm.not_injOn_toQuadraticForm_isSymm.{u} :
     ¬∀ {R M : Type u} [CommSemiring R] [AddCommMonoid M], ∀ [Module R M],
       Set.InjOn (toQuadraticForm : BilinForm R M → QuadraticForm R M) {B | B.IsSymm} := by
   intro h
   let F := ULift.{u} (ZMod 2)
   apply B_ne_zero F
   apply h (isSymm_B F) isSymm_zero
-  rw [BilinForm.toQuadraticForm_zero, BilinForm.toQuadraticForm_eq_zero]
+  rw [toQuadraticForm_zero, toQuadraticForm_eq_zero]
   exact isAlt_B F
-#align counterexample.bilin_form.not_inj_on_to_quadratic_form_is_symm Counterexample.BilinForm.not_injOn_toQuadraticForm_isSymm
+#align counterexample.bilin_form.not_inj_on_to_quadratic_form_is_symm Counterexample.LinearMap.BilinForm.not_injOn_toQuadraticForm_isSymm
 
 end Counterexample
feat: vertex replacement (#6808)

cliqueFree_of_replaceVertex_cliqueFree is still quite long.

Diff
@@ -18,7 +18,7 @@ The counterexample we use is $B (x, y) (x', y') ↦ xy' + x'y$ where `x y x' y'
 -/
 
 
-variable (F : Type _) [Nontrivial F] [CommRing F] [CharP F 2]
+variable (F : Type*) [Nontrivial F] [CommRing F] [CharP F 2]
 
 open BilinForm
 
refactor(LinearAlgebra/QuadraticForm/Basic): remove non-commutativity support (#7581)

As discussed on Zulip, this generalization seems nonsensical as currently implemented.

There are sensible ways to make this generalization, but they are much larger refactors, and in the meantime the current generalization is useless anyway.

Diff
@@ -51,7 +51,7 @@ theorem B_ne_zero : B F ≠ 0 := fun h => by simpa using BilinForm.congr_fun h (
 This disproves a weaker version of `QuadraticForm.associated_left_inverse`.
 -/
 theorem BilinForm.not_injOn_toQuadraticForm_isSymm.{u} :
-    ¬∀ {R M : Type u} [Semiring R] [AddCommMonoid M], ∀ [Module R M],
+    ¬∀ {R M : Type u} [CommSemiring R] [AddCommMonoid M], ∀ [Module R M],
       Set.InjOn (toQuadraticForm : BilinForm R M → QuadraticForm R M) {B | B.IsSymm} := by
   intro h
   let F := ULift.{u} (ZMod 2)
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2023 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
-
-! This file was ported from Lean 3 source module quadratic_form
-! leanprover-community/mathlib commit 328375597f2c0dd00522d9c2e5a33b6a6128feeb
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.LinearAlgebra.QuadraticForm.Basic
 import Mathlib.Algebra.CharP.Two
 import Mathlib.Data.ZMod.Basic
 
+#align_import quadratic_form from "leanprover-community/mathlib"@"328375597f2c0dd00522d9c2e5a33b6a6128feeb"
+
 /-!
 # `QuadraticForm R M` and `Subtype BilinForm.IsSymm` are distinct notions in characteristic 2
 
feat: port RingTheory.RootsOfUnity.Minpoly (#5119)

Co-authored-by: Moritz Firsching <firsching@google.com> Co-authored-by: Riccardo Brasca <riccardo.brasca@gmail.com>

Dependencies 10 + 628

629 files ported (98.4%)
266079 lines ported (98.7%)
Show graph

The unported dependencies are