linear_algebra.exterior_algebra.basicMathlib.LinearAlgebra.ExteriorAlgebra.Basic

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)

(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)

(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)

(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)

(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
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhangir Azerbayev, Adam Topaz, Eric Wieser
 -/
 import LinearAlgebra.CliffordAlgebra.Basic
-import LinearAlgebra.Alternating
+import LinearAlgebra.Alternating.Basic
 
 #align_import linear_algebra.exterior_algebra.basic from "leanprover-community/mathlib"@"5d0c76894ada7940957143163d7b921345474cbc"
 
Diff
@@ -277,7 +277,7 @@ theorem ι_eq_algebraMap_iff (x : M) (r : R) : ι R x = algebraMap R _ r ↔ x =
   · letI : Module Rᵐᵒᵖ M := Module.compHom _ ((RingHom.id R).fromOpposite mul_comm)
     haveI : IsCentralScalar R M := ⟨fun r m => rfl⟩
     have hf0 : to_triv_sq_zero_ext (ι R x) = (0, x) := to_triv_sq_zero_ext_ι _
-    rw [h, AlgHom.commutes] at hf0 
+    rw [h, AlgHom.commutes] at hf0
     have : r = 0 ∧ 0 = x := Prod.ext_iff.1 hf0
     exact this.symm.imp_left Eq.symm
   · rintro ⟨rfl, rfl⟩
@@ -302,7 +302,7 @@ theorem ι_range_disjoint_one :
   by
   rw [Submodule.disjoint_def]
   rintro _ ⟨x, hx⟩ ⟨r, rfl : algebraMap _ _ _ = _⟩
-  rw [ι_eq_algebra_map_iff x] at hx 
+  rw [ι_eq_algebra_map_iff x] at hx
   rw [hx.2, RingHom.map_zero]
 #align exterior_algebra.ι_range_disjoint_one ExteriorAlgebra.ι_range_disjoint_one
 -/
@@ -326,8 +326,8 @@ theorem ι_mul_prod_list {n : ℕ} (f : Fin n → M) (i : Fin n) :
     by_cases h : i = 0
     · rw [h, ι_sq_zero, MulZeroClass.zero_mul]
     · replace hn := congr_arg ((· * ·) <| ι R <| f 0) (hn (fun i => f <| Fin.succ i) (i.pred h))
-      simp only at hn 
-      rw [Fin.succ_pred, ← mul_assoc, MulZeroClass.mul_zero] at hn 
+      simp only at hn
+      rw [Fin.succ_pred, ← mul_assoc, MulZeroClass.mul_zero] at hn
       refine' (eq_zero_iff_eq_zero_of_add_eq_zero _).mp hn
       rw [← add_mul, ι_add_mul_swap, MulZeroClass.zero_mul]
 #align exterior_algebra.ι_mul_prod_list ExteriorAlgebra.ι_mul_prod_list
@@ -356,7 +356,7 @@ def ιMulti (n : ℕ) : AlternatingMap R M (ExteriorAlgebra R M) (Fin n) :=
       · exact x.elim0
       · rw [List.ofFn_succ, List.prod_cons]
         by_cases hx : x = 0
-        · rw [hx] at hfxy h 
+        · rw [hx] at hfxy h
           rw [hfxy, ← Fin.succ_pred y (ne_of_lt h).symm]
           exact ι_mul_prod_list (f ∘ Fin.succ) _
         · convert MulZeroClass.mul_zero _
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2020 Adam Topaz. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhangir Azerbayev, Adam Topaz, Eric Wieser
 -/
-import Mathbin.LinearAlgebra.CliffordAlgebra.Basic
-import Mathbin.LinearAlgebra.Alternating
+import LinearAlgebra.CliffordAlgebra.Basic
+import LinearAlgebra.Alternating
 
 #align_import linear_algebra.exterior_algebra.basic from "leanprover-community/mathlib"@"5d0c76894ada7940957143163d7b921345474cbc"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2020 Adam Topaz. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhangir Azerbayev, Adam Topaz, Eric Wieser
-
-! This file was ported from Lean 3 source module linear_algebra.exterior_algebra.basic
-! leanprover-community/mathlib commit 5d0c76894ada7940957143163d7b921345474cbc
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.LinearAlgebra.CliffordAlgebra.Basic
 import Mathbin.LinearAlgebra.Alternating
 
+#align_import linear_algebra.exterior_algebra.basic from "leanprover-community/mathlib"@"5d0c76894ada7940957143163d7b921345474cbc"
+
 /-!
 # Exterior Algebras
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhangir Azerbayev, Adam Topaz, Eric Wieser
 
 ! This file was ported from Lean 3 source module linear_algebra.exterior_algebra.basic
-! leanprover-community/mathlib commit b8d2eaa69d69ce8f03179a5cda774fc0cde984e4
+! leanprover-community/mathlib commit 5d0c76894ada7940957143163d7b921345474cbc
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.LinearAlgebra.Alternating
 /-!
 # Exterior Algebras
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 We construct the exterior algebra of a module `M` over a commutative semiring `R`.
 
 ## Notation
Diff
@@ -51,41 +51,50 @@ variable (R : Type u1) [CommRing R]
 
 variable (M : Type u2) [AddCommGroup M] [Module R M]
 
+#print ExteriorAlgebra /-
 /-- The exterior algebra of an `R`-module `M`.
 -/
 @[reducible]
 def ExteriorAlgebra :=
   CliffordAlgebra (0 : QuadraticForm R M)
 #align exterior_algebra ExteriorAlgebra
+-/
 
 namespace ExteriorAlgebra
 
 variable {M}
 
+#print ExteriorAlgebra.ι /-
 /-- The canonical linear map `M →ₗ[R] exterior_algebra R M`.
 -/
 @[reducible]
 def ι : M →ₗ[R] ExteriorAlgebra R M :=
   CliffordAlgebra.ι _
 #align exterior_algebra.ι ExteriorAlgebra.ι
+-/
 
 variable {R}
 
+#print ExteriorAlgebra.ι_sq_zero /-
 /-- As well as being linear, `ι m` squares to zero -/
 @[simp]
 theorem ι_sq_zero (m : M) : ι R m * ι R m = 0 :=
   (CliffordAlgebra.ι_sq_scalar _ m).trans <| map_zero _
 #align exterior_algebra.ι_sq_zero ExteriorAlgebra.ι_sq_zero
+-/
 
 variable {A : Type _} [Semiring A] [Algebra R A]
 
+#print ExteriorAlgebra.comp_ι_sq_zero /-
 @[simp]
 theorem comp_ι_sq_zero (g : ExteriorAlgebra R M →ₐ[R] A) (m : M) : g (ι R m) * g (ι R m) = 0 := by
   rw [← AlgHom.map_mul, ι_sq_zero, AlgHom.map_zero]
 #align exterior_algebra.comp_ι_sq_zero ExteriorAlgebra.comp_ι_sq_zero
+-/
 
 variable (R)
 
+#print ExteriorAlgebra.lift /-
 /-- Given a linear map `f : M →ₗ[R] A` into an `R`-algebra `A`, which satisfies the condition:
 `cond : ∀ m : M, f m * f m = 0`, this is the canonical lift of `f` to a morphism of `R`-algebras
 from `exterior_algebra R M` to `A`.
@@ -94,40 +103,52 @@ from `exterior_algebra R M` to `A`.
 def lift : { f : M →ₗ[R] A // ∀ m, f m * f m = 0 } ≃ (ExteriorAlgebra R M →ₐ[R] A) :=
   Equiv.trans (Equiv.subtypeEquiv (Equiv.refl _) <| by simp) <| CliffordAlgebra.lift _
 #align exterior_algebra.lift ExteriorAlgebra.lift
+-/
 
+#print ExteriorAlgebra.ι_comp_lift /-
 @[simp]
 theorem ι_comp_lift (f : M →ₗ[R] A) (cond : ∀ m, f m * f m = 0) :
     (lift R ⟨f, cond⟩).toLinearMap.comp (ι R) = f :=
   CliffordAlgebra.ι_comp_lift f _
 #align exterior_algebra.ι_comp_lift ExteriorAlgebra.ι_comp_lift
+-/
 
+#print ExteriorAlgebra.lift_ι_apply /-
 @[simp]
 theorem lift_ι_apply (f : M →ₗ[R] A) (cond : ∀ m, f m * f m = 0) (x) :
     lift R ⟨f, cond⟩ (ι R x) = f x :=
   CliffordAlgebra.lift_ι_apply f _ x
 #align exterior_algebra.lift_ι_apply ExteriorAlgebra.lift_ι_apply
+-/
 
+#print ExteriorAlgebra.lift_unique /-
 @[simp]
 theorem lift_unique (f : M →ₗ[R] A) (cond : ∀ m, f m * f m = 0) (g : ExteriorAlgebra R M →ₐ[R] A) :
     g.toLinearMap.comp (ι R) = f ↔ g = lift R ⟨f, cond⟩ :=
   CliffordAlgebra.lift_unique f _ _
 #align exterior_algebra.lift_unique ExteriorAlgebra.lift_unique
+-/
 
 variable {R M}
 
+#print ExteriorAlgebra.lift_comp_ι /-
 @[simp]
 theorem lift_comp_ι (g : ExteriorAlgebra R M →ₐ[R] A) :
     lift R ⟨g.toLinearMap.comp (ι R), comp_ι_sq_zero _⟩ = g :=
   CliffordAlgebra.lift_comp_ι g
 #align exterior_algebra.lift_comp_ι ExteriorAlgebra.lift_comp_ι
+-/
 
+#print ExteriorAlgebra.hom_ext /-
 /-- See note [partially-applied ext lemmas]. -/
 @[ext]
 theorem hom_ext {f g : ExteriorAlgebra R M →ₐ[R] A}
     (h : f.toLinearMap.comp (ι R) = g.toLinearMap.comp (ι R)) : f = g :=
   CliffordAlgebra.hom_ext h
 #align exterior_algebra.hom_ext ExteriorAlgebra.hom_ext
+-/
 
+#print ExteriorAlgebra.induction /-
 /-- If `C` holds for the `algebra_map` of `r : R` into `exterior_algebra R M`, the `ι` of `x : M`,
 and is preserved under addition and muliplication, then it holds for all of `exterior_algebra R M`.
 -/
@@ -138,61 +159,81 @@ theorem induction {C : ExteriorAlgebra R M → Prop}
     (a : ExteriorAlgebra R M) : C a :=
   CliffordAlgebra.induction h_grade0 h_grade1 h_mul h_add a
 #align exterior_algebra.induction ExteriorAlgebra.induction
+-/
 
+#print ExteriorAlgebra.algebraMapInv /-
 /-- The left-inverse of `algebra_map`. -/
 def algebraMapInv : ExteriorAlgebra R M →ₐ[R] R :=
   ExteriorAlgebra.lift R ⟨(0 : M →ₗ[R] R), fun m => by simp⟩
 #align exterior_algebra.algebra_map_inv ExteriorAlgebra.algebraMapInv
+-/
 
 variable (M)
 
+#print ExteriorAlgebra.algebraMap_leftInverse /-
 theorem algebraMap_leftInverse :
     Function.LeftInverse algebraMapInv (algebraMap R <| ExteriorAlgebra R M) := fun x => by
   simp [algebra_map_inv]
 #align exterior_algebra.algebra_map_left_inverse ExteriorAlgebra.algebraMap_leftInverse
+-/
 
+#print ExteriorAlgebra.algebraMap_inj /-
 @[simp]
 theorem algebraMap_inj (x y : R) :
     algebraMap R (ExteriorAlgebra R M) x = algebraMap R (ExteriorAlgebra R M) y ↔ x = y :=
   (algebraMap_leftInverse M).Injective.eq_iff
 #align exterior_algebra.algebra_map_inj ExteriorAlgebra.algebraMap_inj
+-/
 
+#print ExteriorAlgebra.algebraMap_eq_zero_iff /-
 @[simp]
 theorem algebraMap_eq_zero_iff (x : R) : algebraMap R (ExteriorAlgebra R M) x = 0 ↔ x = 0 :=
   map_eq_zero_iff (algebraMap _ _) (algebraMap_leftInverse _).Injective
 #align exterior_algebra.algebra_map_eq_zero_iff ExteriorAlgebra.algebraMap_eq_zero_iff
+-/
 
+#print ExteriorAlgebra.algebraMap_eq_one_iff /-
 @[simp]
 theorem algebraMap_eq_one_iff (x : R) : algebraMap R (ExteriorAlgebra R M) x = 1 ↔ x = 1 :=
   map_eq_one_iff (algebraMap _ _) (algebraMap_leftInverse _).Injective
 #align exterior_algebra.algebra_map_eq_one_iff ExteriorAlgebra.algebraMap_eq_one_iff
+-/
 
+#print ExteriorAlgebra.isUnit_algebraMap /-
 theorem isUnit_algebraMap (r : R) : IsUnit (algebraMap R (ExteriorAlgebra R M) r) ↔ IsUnit r :=
   isUnit_map_of_leftInverse _ (algebraMap_leftInverse M)
 #align exterior_algebra.is_unit_algebra_map ExteriorAlgebra.isUnit_algebraMap
+-/
 
+#print ExteriorAlgebra.invertibleAlgebraMapEquiv /-
 /-- Invertibility in the exterior algebra is the same as invertibility of the base ring. -/
 @[simps]
 def invertibleAlgebraMapEquiv (r : R) :
     Invertible (algebraMap R (ExteriorAlgebra R M) r) ≃ Invertible r :=
   invertibleEquivOfLeftInverse _ _ _ (algebraMap_leftInverse M)
 #align exterior_algebra.invertible_algebra_map_equiv ExteriorAlgebra.invertibleAlgebraMapEquiv
+-/
 
 variable {M}
 
+#print ExteriorAlgebra.toTrivSqZeroExt /-
 /-- The canonical map from `exterior_algebra R M` into `triv_sq_zero_ext R M` that sends
 `exterior_algebra.ι` to `triv_sq_zero_ext.inr`. -/
 def toTrivSqZeroExt [Module Rᵐᵒᵖ M] [IsCentralScalar R M] :
     ExteriorAlgebra R M →ₐ[R] TrivSqZeroExt R M :=
   lift R ⟨TrivSqZeroExt.inrHom R M, fun m => TrivSqZeroExt.inr_mul_inr R m m⟩
 #align exterior_algebra.to_triv_sq_zero_ext ExteriorAlgebra.toTrivSqZeroExt
+-/
 
+#print ExteriorAlgebra.toTrivSqZeroExt_ι /-
 @[simp]
 theorem toTrivSqZeroExt_ι [Module Rᵐᵒᵖ M] [IsCentralScalar R M] (x : M) :
     toTrivSqZeroExt (ι R x) = TrivSqZeroExt.inr x :=
   lift_ι_apply _ _ _ _
 #align exterior_algebra.to_triv_sq_zero_ext_ι ExteriorAlgebra.toTrivSqZeroExt_ι
+-/
 
+#print ExteriorAlgebra.ιInv /-
 /-- The left-inverse of `ι`.
 
 As an implementation detail, we implement this using `triv_sq_zero_ext` which has a suitable
@@ -203,24 +244,32 @@ def ιInv : ExteriorAlgebra R M →ₗ[R] M :=
   haveI : IsCentralScalar R M := ⟨fun r m => rfl⟩
   exact (TrivSqZeroExt.sndHom R M).comp to_triv_sq_zero_ext.to_linear_map
 #align exterior_algebra.ι_inv ExteriorAlgebra.ιInv
+-/
 
+#print ExteriorAlgebra.ι_leftInverse /-
 theorem ι_leftInverse : Function.LeftInverse ιInv (ι R : M → ExteriorAlgebra R M) := fun x => by
   simp [ι_inv]
 #align exterior_algebra.ι_left_inverse ExteriorAlgebra.ι_leftInverse
+-/
 
 variable (R)
 
+#print ExteriorAlgebra.ι_inj /-
 @[simp]
 theorem ι_inj (x y : M) : ι R x = ι R y ↔ x = y :=
   ι_leftInverse.Injective.eq_iff
 #align exterior_algebra.ι_inj ExteriorAlgebra.ι_inj
+-/
 
 variable {R}
 
+#print ExteriorAlgebra.ι_eq_zero_iff /-
 @[simp]
 theorem ι_eq_zero_iff (x : M) : ι R x = 0 ↔ x = 0 := by rw [← ι_inj R x 0, LinearMap.map_zero]
 #align exterior_algebra.ι_eq_zero_iff ExteriorAlgebra.ι_eq_zero_iff
+-/
 
+#print ExteriorAlgebra.ι_eq_algebraMap_iff /-
 @[simp]
 theorem ι_eq_algebraMap_iff (x : M) (r : R) : ι R x = algebraMap R _ r ↔ x = 0 ∧ r = 0 :=
   by
@@ -234,14 +283,18 @@ theorem ι_eq_algebraMap_iff (x : M) (r : R) : ι R x = algebraMap R _ r ↔ x =
   · rintro ⟨rfl, rfl⟩
     rw [LinearMap.map_zero, RingHom.map_zero]
 #align exterior_algebra.ι_eq_algebra_map_iff ExteriorAlgebra.ι_eq_algebraMap_iff
+-/
 
+#print ExteriorAlgebra.ι_ne_one /-
 @[simp]
 theorem ι_ne_one [Nontrivial R] (x : M) : ι R x ≠ 1 :=
   by
   rw [← (algebraMap R (ExteriorAlgebra R M)).map_one, Ne.def, ι_eq_algebra_map_iff]
   exact one_ne_zero ∘ And.right
 #align exterior_algebra.ι_ne_one ExteriorAlgebra.ι_ne_one
+-/
 
+#print ExteriorAlgebra.ι_range_disjoint_one /-
 /-- The generators of the exterior algebra are disjoint from its scalars. -/
 theorem ι_range_disjoint_one :
     Disjoint (LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M))
@@ -252,14 +305,18 @@ theorem ι_range_disjoint_one :
   rw [ι_eq_algebra_map_iff x] at hx 
   rw [hx.2, RingHom.map_zero]
 #align exterior_algebra.ι_range_disjoint_one ExteriorAlgebra.ι_range_disjoint_one
+-/
 
+#print ExteriorAlgebra.ι_add_mul_swap /-
 @[simp]
 theorem ι_add_mul_swap (x y : M) : ι R x * ι R y + ι R y * ι R x = 0 :=
   calc
     _ = ι R (x + y) * ι R (x + y) := by simp [mul_add, add_mul]
     _ = _ := ι_sq_zero _
 #align exterior_algebra.ι_add_mul_swap ExteriorAlgebra.ι_add_mul_swap
+-/
 
+#print ExteriorAlgebra.ι_mul_prod_list /-
 theorem ι_mul_prod_list {n : ℕ} (f : Fin n → M) (i : Fin n) :
     (ι R <| f i) * (List.ofFn fun i => ι R <| f i).Prod = 0 :=
   by
@@ -274,9 +331,11 @@ theorem ι_mul_prod_list {n : ℕ} (f : Fin n → M) (i : Fin n) :
       refine' (eq_zero_iff_eq_zero_of_add_eq_zero _).mp hn
       rw [← add_mul, ι_add_mul_swap, MulZeroClass.zero_mul]
 #align exterior_algebra.ι_mul_prod_list ExteriorAlgebra.ι_mul_prod_list
+-/
 
 variable (R)
 
+#print ExteriorAlgebra.ιMulti /-
 /-- The product of `n` terms of the form `ι R m` is an alternating map.
 
 This is a special case of `multilinear_map.mk_pi_algebra_fin`, and the exterior algebra version of
@@ -308,24 +367,32 @@ def ιMulti (n : ℕ) : AlternatingMap R M (ExteriorAlgebra R M) (Fin n) :=
           exact hfxy
     toFun := F }
 #align exterior_algebra.ι_multi ExteriorAlgebra.ιMulti
+-/
 
 variable {R}
 
+#print ExteriorAlgebra.ιMulti_apply /-
 theorem ιMulti_apply {n : ℕ} (v : Fin n → M) : ιMulti R n v = (List.ofFn fun i => ι R (v i)).Prod :=
   rfl
 #align exterior_algebra.ι_multi_apply ExteriorAlgebra.ιMulti_apply
+-/
 
+#print ExteriorAlgebra.ιMulti_zero_apply /-
 @[simp]
 theorem ιMulti_zero_apply (v : Fin 0 → M) : ιMulti R 0 v = 1 :=
   rfl
 #align exterior_algebra.ι_multi_zero_apply ExteriorAlgebra.ιMulti_zero_apply
+-/
 
+#print ExteriorAlgebra.ιMulti_succ_apply /-
 @[simp]
 theorem ιMulti_succ_apply {n : ℕ} (v : Fin n.succ → M) :
     ιMulti R _ v = ι R (v 0) * ιMulti R _ (Matrix.vecTail v) :=
   (congr_arg List.prod (List.ofFn_succ _)).trans List.prod_cons
 #align exterior_algebra.ι_multi_succ_apply ExteriorAlgebra.ιMulti_succ_apply
+-/
 
+#print ExteriorAlgebra.ιMulti_succ_curryLeft /-
 theorem ιMulti_succ_curryLeft {n : ℕ} (m : M) :
     (ιMulti R n.succ).curryLeft m = (LinearMap.mulLeft R (ι R m)).compAlternatingMap (ιMulti R n) :=
   AlternatingMap.ext fun v =>
@@ -333,6 +400,7 @@ theorem ιMulti_succ_curryLeft {n : ℕ} (m : M) :
       simp_rw [Matrix.tail_cons]
       rfl
 #align exterior_algebra.ι_multi_succ_curry_left ExteriorAlgebra.ιMulti_succ_curryLeft
+-/
 
 end ExteriorAlgebra
 
@@ -340,16 +408,20 @@ namespace TensorAlgebra
 
 variable {R M}
 
+#print TensorAlgebra.toExterior /-
 /-- The canonical image of the `tensor_algebra` in the `exterior_algebra`, which maps
 `tensor_algebra.ι R x` to `exterior_algebra.ι R x`. -/
 def toExterior : TensorAlgebra R M →ₐ[R] ExteriorAlgebra R M :=
   TensorAlgebra.lift R (ExteriorAlgebra.ι R : M →ₗ[R] ExteriorAlgebra R M)
 #align tensor_algebra.to_exterior TensorAlgebra.toExterior
+-/
 
+#print TensorAlgebra.toExterior_ι /-
 @[simp]
 theorem toExterior_ι (m : M) : (TensorAlgebra.ι R m).toExterior = ExteriorAlgebra.ι R m := by
   simp [to_exterior]
 #align tensor_algebra.to_exterior_ι TensorAlgebra.toExterior_ι
+-/
 
 end TensorAlgebra
 
Diff
@@ -258,7 +258,6 @@ theorem ι_add_mul_swap (x y : M) : ι R x * ι R y + ι R y * ι R x = 0 :=
   calc
     _ = ι R (x + y) * ι R (x + y) := by simp [mul_add, add_mul]
     _ = _ := ι_sq_zero _
-    
 #align exterior_algebra.ι_add_mul_swap ExteriorAlgebra.ι_add_mul_swap
 
 theorem ι_mul_prod_list {n : ℕ} (f : Fin n → M) (i : Fin n) :
Diff
@@ -228,7 +228,7 @@ theorem ι_eq_algebraMap_iff (x : M) (r : R) : ι R x = algebraMap R _ r ↔ x =
   · letI : Module Rᵐᵒᵖ M := Module.compHom _ ((RingHom.id R).fromOpposite mul_comm)
     haveI : IsCentralScalar R M := ⟨fun r m => rfl⟩
     have hf0 : to_triv_sq_zero_ext (ι R x) = (0, x) := to_triv_sq_zero_ext_ι _
-    rw [h, AlgHom.commutes] at hf0
+    rw [h, AlgHom.commutes] at hf0 
     have : r = 0 ∧ 0 = x := Prod.ext_iff.1 hf0
     exact this.symm.imp_left Eq.symm
   · rintro ⟨rfl, rfl⟩
@@ -249,7 +249,7 @@ theorem ι_range_disjoint_one :
   by
   rw [Submodule.disjoint_def]
   rintro _ ⟨x, hx⟩ ⟨r, rfl : algebraMap _ _ _ = _⟩
-  rw [ι_eq_algebra_map_iff x] at hx
+  rw [ι_eq_algebra_map_iff x] at hx 
   rw [hx.2, RingHom.map_zero]
 #align exterior_algebra.ι_range_disjoint_one ExteriorAlgebra.ι_range_disjoint_one
 
@@ -270,8 +270,8 @@ theorem ι_mul_prod_list {n : ℕ} (f : Fin n → M) (i : Fin n) :
     by_cases h : i = 0
     · rw [h, ι_sq_zero, MulZeroClass.zero_mul]
     · replace hn := congr_arg ((· * ·) <| ι R <| f 0) (hn (fun i => f <| Fin.succ i) (i.pred h))
-      simp only at hn
-      rw [Fin.succ_pred, ← mul_assoc, MulZeroClass.mul_zero] at hn
+      simp only at hn 
+      rw [Fin.succ_pred, ← mul_assoc, MulZeroClass.mul_zero] at hn 
       refine' (eq_zero_iff_eq_zero_of_add_eq_zero _).mp hn
       rw [← add_mul, ι_add_mul_swap, MulZeroClass.zero_mul]
 #align exterior_algebra.ι_mul_prod_list ExteriorAlgebra.ι_mul_prod_list
@@ -298,7 +298,7 @@ def ιMulti (n : ℕ) : AlternatingMap R M (ExteriorAlgebra R M) (Fin n) :=
       · exact x.elim0
       · rw [List.ofFn_succ, List.prod_cons]
         by_cases hx : x = 0
-        · rw [hx] at hfxy h
+        · rw [hx] at hfxy h 
           rw [hfxy, ← Fin.succ_pred y (ne_of_lt h).symm]
           exact ι_mul_prod_list (f ∘ Fin.succ) _
         · convert MulZeroClass.mul_zero _
Diff
@@ -268,12 +268,12 @@ theorem ι_mul_prod_list {n : ℕ} (f : Fin n → M) (i : Fin n) :
   · exact i.elim0
   · rw [List.ofFn_succ, List.prod_cons, ← mul_assoc]
     by_cases h : i = 0
-    · rw [h, ι_sq_zero, zero_mul]
+    · rw [h, ι_sq_zero, MulZeroClass.zero_mul]
     · replace hn := congr_arg ((· * ·) <| ι R <| f 0) (hn (fun i => f <| Fin.succ i) (i.pred h))
       simp only at hn
-      rw [Fin.succ_pred, ← mul_assoc, mul_zero] at hn
+      rw [Fin.succ_pred, ← mul_assoc, MulZeroClass.mul_zero] at hn
       refine' (eq_zero_iff_eq_zero_of_add_eq_zero _).mp hn
-      rw [← add_mul, ι_add_mul_swap, zero_mul]
+      rw [← add_mul, ι_add_mul_swap, MulZeroClass.zero_mul]
 #align exterior_algebra.ι_mul_prod_list ExteriorAlgebra.ι_mul_prod_list
 
 variable (R)
@@ -301,7 +301,7 @@ def ιMulti (n : ℕ) : AlternatingMap R M (ExteriorAlgebra R M) (Fin n) :=
         · rw [hx] at hfxy h
           rw [hfxy, ← Fin.succ_pred y (ne_of_lt h).symm]
           exact ι_mul_prod_list (f ∘ Fin.succ) _
-        · convert mul_zero _
+        · convert MulZeroClass.mul_zero _
           refine'
             hn (fun i => f <| Fin.succ i) (x.pred hx)
               (y.pred (ne_of_lt <| lt_of_le_of_lt x.zero_le h).symm) _ (fin.pred_lt_pred_iff.mpr h)
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhangir Azerbayev, Adam Topaz, Eric Wieser
 
 ! This file was ported from Lean 3 source module linear_algebra.exterior_algebra.basic
-! leanprover-community/mathlib commit 92ca63f0fb391a9ca5f22d2409a6080e786d99f7
+! leanprover-community/mathlib commit b8d2eaa69d69ce8f03179a5cda774fc0cde984e4
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -182,12 +182,14 @@ variable {M}
 
 /-- The canonical map from `exterior_algebra R M` into `triv_sq_zero_ext R M` that sends
 `exterior_algebra.ι` to `triv_sq_zero_ext.inr`. -/
-def toTrivSqZeroExt : ExteriorAlgebra R M →ₐ[R] TrivSqZeroExt R M :=
+def toTrivSqZeroExt [Module Rᵐᵒᵖ M] [IsCentralScalar R M] :
+    ExteriorAlgebra R M →ₐ[R] TrivSqZeroExt R M :=
   lift R ⟨TrivSqZeroExt.inrHom R M, fun m => TrivSqZeroExt.inr_mul_inr R m m⟩
 #align exterior_algebra.to_triv_sq_zero_ext ExteriorAlgebra.toTrivSqZeroExt
 
 @[simp]
-theorem toTrivSqZeroExt_ι (x : M) : toTrivSqZeroExt (ι R x) = TrivSqZeroExt.inr x :=
+theorem toTrivSqZeroExt_ι [Module Rᵐᵒᵖ M] [IsCentralScalar R M] (x : M) :
+    toTrivSqZeroExt (ι R x) = TrivSqZeroExt.inr x :=
   lift_ι_apply _ _ _ _
 #align exterior_algebra.to_triv_sq_zero_ext_ι ExteriorAlgebra.toTrivSqZeroExt_ι
 
@@ -196,7 +198,10 @@ theorem toTrivSqZeroExt_ι (x : M) : toTrivSqZeroExt (ι R x) = TrivSqZeroExt.in
 As an implementation detail, we implement this using `triv_sq_zero_ext` which has a suitable
 algebra structure. -/
 def ιInv : ExteriorAlgebra R M →ₗ[R] M :=
-  (TrivSqZeroExt.sndHom R M).comp toTrivSqZeroExt.toLinearMap
+  by
+  letI : Module Rᵐᵒᵖ M := Module.compHom _ ((RingHom.id R).fromOpposite mul_comm)
+  haveI : IsCentralScalar R M := ⟨fun r m => rfl⟩
+  exact (TrivSqZeroExt.sndHom R M).comp to_triv_sq_zero_ext.to_linear_map
 #align exterior_algebra.ι_inv ExteriorAlgebra.ιInv
 
 theorem ι_leftInverse : Function.LeftInverse ιInv (ι R : M → ExteriorAlgebra R M) := fun x => by
@@ -220,7 +225,9 @@ theorem ι_eq_zero_iff (x : M) : ι R x = 0 ↔ x = 0 := by rw [← ι_inj R x 0
 theorem ι_eq_algebraMap_iff (x : M) (r : R) : ι R x = algebraMap R _ r ↔ x = 0 ∧ r = 0 :=
   by
   refine' ⟨fun h => _, _⟩
-  · have hf0 : to_triv_sq_zero_ext (ι R x) = (0, x) := to_triv_sq_zero_ext_ι _
+  · letI : Module Rᵐᵒᵖ M := Module.compHom _ ((RingHom.id R).fromOpposite mul_comm)
+    haveI : IsCentralScalar R M := ⟨fun r m => rfl⟩
+    have hf0 : to_triv_sq_zero_ext (ι R x) = (0, x) := to_triv_sq_zero_ext_ι _
     rw [h, AlgHom.commutes] at hf0
     have : r = 0 ∧ 0 = x := Prod.ext_iff.1 hf0
     exact this.symm.imp_left Eq.symm

Changes in mathlib4

mathlib3
mathlib4
chore: avoid Ne.def (adaptation for nightly-2024-03-27) (#11801)
Diff
@@ -254,7 +254,7 @@ theorem ι_eq_algebraMap_iff (x : M) (r : R) : ι R x = algebraMap R _ r ↔ x =
 
 @[simp]
 theorem ι_ne_one [Nontrivial R] (x : M) : ι R x ≠ 1 := by
-  rw [← (algebraMap R (ExteriorAlgebra R M)).map_one, Ne.def, ι_eq_algebraMap_iff]
+  rw [← (algebraMap R (ExteriorAlgebra R M)).map_one, Ne, ι_eq_algebraMap_iff]
   exact one_ne_zero ∘ And.right
 #align exterior_algebra.ι_ne_one ExteriorAlgebra.ι_ne_one
 
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -50,7 +50,6 @@ as this avoids us having to duplicate API.
 universe u1 u2 u3 u4 u5
 
 variable (R : Type u1) [CommRing R]
-
 variable (M : Type u2) [AddCommGroup M] [Module R M]
 
 /-- The exterior algebra of an `R`-module `M`.
fix: denote alternating map by ⋀, not Λ (#11064)

That is, \bigwedge, not \Lambda

Co-authored-by: Richard Copley <rcopley@gmail.com> Co-authored-by: Patrick Massot <patrickmassot@free.fr>

Diff
@@ -295,7 +295,7 @@ variable (R)
 
 This is a special case of `MultilinearMap.mkPiAlgebraFin`, and the exterior algebra version of
 `TensorAlgebra.tprod`. -/
-def ιMulti (n : ℕ) : M [Λ^Fin n]→ₗ[R] ExteriorAlgebra R M :=
+def ιMulti (n : ℕ) : M [⋀^Fin n]→ₗ[R] ExteriorAlgebra R M :=
   let F := (MultilinearMap.mkPiAlgebraFin R n (ExteriorAlgebra R M)).compLinearMap fun _ => ι R
   { F with
     map_eq_zero_of_eq' := fun f x y hfxy hxy => by
chore: rename induction principle arguments around CliffordAlgebra (#10908)

In order to improve the ergonomics of the induction tactic, this renames the arguments of:

  • ExteriorAlgebra.induction
  • TensorAlgebra.induction
  • CliffordAlgebra.induction
  • CliffordAlgebra.left_induction
  • CliffordAlgebra.right_induction
  • CliffordAlgebra.even_induction
  • CliffordAlgebra.odd_induction
  • Submodule.iSup_induction'
  • Submodule.pow_induction_on_left'
  • Submodule.pow_induction_on_right'

This is slightly awkward for name-resolution within these induction principles, as the argument names end up clashing with the function they are about. Thankfully, this pain is not transferred to the caller using induction _ using _.

Diff
@@ -150,10 +150,10 @@ and is preserved under addition and muliplication, then it holds for all of `Ext
 -/
 @[elab_as_elim]
 theorem induction {C : ExteriorAlgebra R M → Prop}
-    (h_grade0 : ∀ r, C (algebraMap R (ExteriorAlgebra R M) r)) (h_grade1 : ∀ x, C (ι R x))
-    (h_mul : ∀ a b, C a → C b → C (a * b)) (h_add : ∀ a b, C a → C b → C (a + b))
+    (algebraMap : ∀ r, C (algebraMap R (ExteriorAlgebra R M) r)) (ι : ∀ x, C (ι R x))
+    (mul : ∀ a b, C a → C b → C (a * b)) (add : ∀ a b, C a → C b → C (a + b))
     (a : ExteriorAlgebra R M) : C a :=
-  CliffordAlgebra.induction h_grade0 h_grade1 h_mul h_add a
+  CliffordAlgebra.induction algebraMap ι mul add a
 #align exterior_algebra.induction ExteriorAlgebra.induction
 
 /-- The left-inverse of `algebraMap`. -/
refactor(LinearAlgebra/ExteriorAlgebra/{Basic,Grading}): add a definition and notation for the exterior powers of a module (#10744)

This is split off from PR #10654 (that actually proves some properties of the exterior powers). It introduces the reducible definition exteriorPower R n M for the nth exterior power of the R-module M; this is of type Submodule R (ExteriorAlgebra R M) and defined as LinearMap.range (ExteriorAlgebra.ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n. It also introduces the notation Λ[R]^n M for exteriorPower R n M.

Note: for a reason that I don't understand, Lean becomes unable to synthesize the SetLike.GradedMonoid instance on fun (i : ℕ) ↦ (Λ[R]^i) M, so I added it manually in ExteriorAlgebra/Graded.lean. I am far from sure that this is the correct solution.

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Richard Copley <buster@buster.me.uk>

Diff
@@ -18,6 +18,11 @@ We construct the exterior algebra of a module `M` over a commutative semiring `R
 The exterior algebra of the `R`-module `M` is denoted as `ExteriorAlgebra R M`.
 It is endowed with the structure of an `R`-algebra.
 
+The `n`th exterior power of the `R`-module `M` is denoted by `exteriorPower R n M`;
+it is of type `Submodule R (ExteriorAlgebra R M)` and defined as
+`LinearMap.range (ExteriorAlgebra.ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n`.
+We also introduce the notation `⋀[R]^n M` for `exteriorPower R n M`.
+
 Given a linear morphism `f : M → A` from a module `M` to another `R`-algebra `A`, such that
 `cond : ∀ m : M, f m * f m = 0`, there is a (unique) lift of `f` to an `R`-algebra morphism,
 which is denoted `ExteriorAlgebra.lift R f cond`.
@@ -66,6 +71,21 @@ def ι : M →ₗ[R] ExteriorAlgebra R M :=
   CliffordAlgebra.ι _
 #align exterior_algebra.ι ExteriorAlgebra.ι
 
+section exteriorPower
+
+-- New variables `n` and `M`, to get the correct order of variables in the notation.
+variable (n : ℕ) (M : Type u2) [AddCommGroup M] [Module R M]
+
+/-- Definition of the `n`th exterior power of a `R`-module `N`. We introduce the notation
+`⋀[R]^n M` for `exteriorPower R n M`. -/
+abbrev exteriorPower : Submodule R (ExteriorAlgebra R M) :=
+  LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n
+
+@[inherit_doc exteriorPower]
+notation:max "⋀[" R "]^" n:arg => exteriorPower R n
+
+end exteriorPower
+
 variable {R}
 
 /-- As well as being linear, `ι m` squares to zero. -/
@@ -333,7 +353,7 @@ variable (R)
 
 /-- The image of `ExteriorAlgebra.ιMulti R n` is contained in the `n`th exterior power. -/
 lemma ιMulti_range (n : ℕ) :
-    Set.range (ιMulti R n (M := M)) ⊆ ↑(LinearMap.range (ι R (M := M)) ^ n) := by
+    Set.range (ιMulti R n (M := M)) ⊆ ↑(⋀[R]^n M) := by
   rw [Set.range_subset_iff]
   intro v
   rw [ιMulti_apply]
@@ -344,10 +364,9 @@ lemma ιMulti_range (n : ℕ) :
 /-- The image of `ExteriorAlgebra.ιMulti R n` spans the `n`th exterior power, as a submodule
 of the exterior algebra. -/
 lemma ιMulti_span_fixedDegree (n : ℕ) :
-    Submodule.span R (Set.range (ιMulti R n)) =
-    LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n := by
+    Submodule.span R (Set.range (ιMulti R n)) = ⋀[R]^n M := by
   refine le_antisymm (Submodule.span_le.2 (ιMulti_range R n)) ?_
-  rw [Submodule.pow_eq_span_pow_set, Submodule.span_le]
+  rw [exteriorPower, Submodule.pow_eq_span_pow_set, Submodule.span_le]
   refine fun u hu ↦ Submodule.subset_span ?_
   obtain ⟨f, rfl⟩ := Set.mem_pow.mp hu
   refine ⟨fun i => ιInv (f i).1, ?_⟩
chore: prepare Lean version bump with explicit simp (#10999)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -279,7 +279,7 @@ def ιMulti (n : ℕ) : M [Λ^Fin n]→ₗ[R] ExteriorAlgebra R M :=
   let F := (MultilinearMap.mkPiAlgebraFin R n (ExteriorAlgebra R M)).compLinearMap fun _ => ι R
   { F with
     map_eq_zero_of_eq' := fun f x y hfxy hxy => by
-      dsimp
+      dsimp [F]
       clear F
       wlog h : x < y
       · exact this R (A := A) n f y x hfxy.symm hxy.symm (hxy.lt_or_lt.resolve_left h)
chore: classify simp can do this porting notes (#10619)

Classify by adding issue number (#10618) to porting notes claiming anything semantically equivalent to simp can prove this or simp can simplify this.

Diff
@@ -69,14 +69,14 @@ def ι : M →ₗ[R] ExteriorAlgebra R M :=
 variable {R}
 
 /-- As well as being linear, `ι m` squares to zero. -/
--- @[simp] -- Porting note: simp can prove this
+-- @[simp] -- Porting note (#10618): simp can prove this
 theorem ι_sq_zero (m : M) : ι R m * ι R m = 0 :=
   (CliffordAlgebra.ι_sq_scalar _ m).trans <| map_zero _
 #align exterior_algebra.ι_sq_zero ExteriorAlgebra.ι_sq_zero
 
 variable {A : Type*} [Semiring A] [Algebra R A]
 
--- @[simp] -- Porting note: simp can prove this
+-- @[simp] -- Porting note (#10618): simp can prove this
 theorem comp_ι_sq_zero (g : ExteriorAlgebra R M →ₐ[R] A) (m : M) : g (ι R m) * g (ι R m) = 0 := by
   rw [← AlgHom.map_mul, ι_sq_zero, AlgHom.map_zero]
 #align exterior_algebra.comp_ι_sq_zero ExteriorAlgebra.comp_ι_sq_zero
feat(LinearAlgebra/{ExteriorAlgebra,CliffordAlgebra}): Functoriality of the exterior algebra and some lemmas about generation (#9718)

This does a few things:

  • Define the algebra morphism TrivSqZeroExt.map f between trivial square-zero extensions induced by a linear mapf, and establish some of its basic properties (functoriality, composition with the basic maps to/from TrivSqZeroExt). Note that we only consider the case of a commutative base ring, because the case of a general base ring requires morphisms of bimodules, which we do not have.

  • Define the algebra morphism ExteriorAlgebra.map f between exterior algebras induced by a linear map f. This is a straightforward application of the similar construction for Clifford algebras, but I think it is still useful to have. Basic properties of this construction are proved: functoriality, composition with ExteriorAlgebra.ι, ExteriorAlgebra.ιInv (this part uses the first point) and ExteriorAlgebra.ιMulti. Then exactness properties of the construction is studied:

    • If the linear map is surjective, then the map on exterior algebras is also surjective. This actually holds for Clifford algebras, so I added a lemma called CliffordAlgebra.map_surjective in LinearAlgebra/CliffordAlgebra/Basic.lean. For exterior algebras, the converse holds and is also proved.
    • If the linear map has a retraction, then the map on exterior algebras is injective. So if the base ring is a field, the map on exterior algebras is injective if the linear map is injective.
  • Establish some properties of ExteriorAlgebra.ιMulti:

    • ExteriorAlgebra.ιMulti_range: The range of ιMulti R n is contained in the nth exterior power (define here as LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n).
    • ExteriorAlgebra.ιMulti_span_fixedDegree: This range spans the nth exterior power.
    • ExteriorAlgebra.ιMulti_span: The union over all n of the range of ιMulti R n spans the whole exterior algebra (this is in LinearAlgebra/ExteriorAlgebra/Grading.lean because the proof uses the graded module structure, but it might be possible to do something simpler).
  • Construct ExteriorAlgebra.ιMulti_family: This takes a natural number n and a family of vectors v indexed by a linearly ordered type I, and it returns the family of n-fold products of the v i in the exterior algebra, indexed by the set of finsets of I of cardinality n. (The point, to be proved in another PR, is that when v is a basis, then ExteriorAlgebra.ιMulti_family R n v is a basis of the nth exterior power.)

Co-authored-by: morel <smorel@math.princeton.edu> Co-authored-by: smorel394 <67864981+smorel394@users.noreply.github.com>

Diff
@@ -42,7 +42,7 @@ as this avoids us having to duplicate API.
 -/
 
 
-universe u1 u2 u3
+universe u1 u2 u3 u4 u5
 
 variable (R : Type u1) [CommRing R]
 
@@ -200,8 +200,7 @@ def ιInv : ExteriorAlgebra R M →ₗ[R] M := by
   exact (TrivSqZeroExt.sndHom R M).comp toTrivSqZeroExt.toLinearMap
 #align exterior_algebra.ι_inv ExteriorAlgebra.ιInv
 
--- Porting note: In the type, changed `ιInv` to `ιInv.1`
-theorem ι_leftInverse : Function.LeftInverse ιInv.1 (ι R : M → ExteriorAlgebra R M) := fun x => by
+theorem ι_leftInverse : Function.LeftInverse ιInv (ι R : M → ExteriorAlgebra R M) := fun x => by
   -- Porting note: Original proof didn't have `letI` and `haveI`
   letI : Module Rᵐᵒᵖ M := Module.compHom _ ((RingHom.id R).fromOpposite mul_comm)
   haveI : IsCentralScalar R M := ⟨fun r m => rfl⟩
@@ -330,10 +329,143 @@ theorem ιMulti_succ_curryLeft {n : ℕ} (m : M) :
       rfl
 #align exterior_algebra.ι_multi_succ_curry_left ExteriorAlgebra.ιMulti_succ_curryLeft
 
+variable (R)
+
+/-- The image of `ExteriorAlgebra.ιMulti R n` is contained in the `n`th exterior power. -/
+lemma ιMulti_range (n : ℕ) :
+    Set.range (ιMulti R n (M := M)) ⊆ ↑(LinearMap.range (ι R (M := M)) ^ n) := by
+  rw [Set.range_subset_iff]
+  intro v
+  rw [ιMulti_apply]
+  apply Submodule.pow_subset_pow
+  rw [Set.mem_pow]
+  exact ⟨fun i => ⟨ι R (v i), LinearMap.mem_range_self _ _⟩, rfl⟩
+
+/-- The image of `ExteriorAlgebra.ιMulti R n` spans the `n`th exterior power, as a submodule
+of the exterior algebra. -/
+lemma ιMulti_span_fixedDegree (n : ℕ) :
+    Submodule.span R (Set.range (ιMulti R n)) =
+    LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n := by
+  refine le_antisymm (Submodule.span_le.2 (ιMulti_range R n)) ?_
+  rw [Submodule.pow_eq_span_pow_set, Submodule.span_le]
+  refine fun u hu ↦ Submodule.subset_span ?_
+  obtain ⟨f, rfl⟩ := Set.mem_pow.mp hu
+  refine ⟨fun i => ιInv (f i).1, ?_⟩
+  rw [ιMulti_apply]
+  congr with i
+  obtain ⟨v, hv⟩ := (f i).prop
+  rw [← hv, ι_leftInverse]
+
+/-- Given a linearly ordered family `v` of vectors of `M` and a natural number `n`, produce the
+family of `n`fold exterior products of elements of `v`, seen as members of the exterior algebra. -/
+abbrev ιMulti_family (n : ℕ) {I : Type*} [LinearOrder I] (v : I → M)
+    (s : {s : Finset I // Finset.card s = n}) : ExteriorAlgebra R M :=
+  ιMulti R n fun i => v (Finset.orderIsoOfFin _ s.prop i)
+
+variable {R}
+
 /-- An `ExteriorAlgebra` over a nontrivial ring is nontrivial. -/
 instance [Nontrivial R] : Nontrivial (ExteriorAlgebra R M) :=
   (algebraMap_leftInverse M).injective.nontrivial
 
+/-! Functoriality of the exterior algebra. -/
+
+variable {N : Type u4} {N' : Type u5} [AddCommGroup N] [Module R N] [AddCommGroup N'] [Module R N']
+
+/-- The morphism of exterior algebras induced by a linear map. -/
+def map (f : M →ₗ[R] N) : ExteriorAlgebra R M →ₐ[R] ExteriorAlgebra R N :=
+  CliffordAlgebra.map { f with map_app' := fun _ => rfl }
+
+@[simp]
+theorem map_comp_ι (f : M →ₗ[R] N) : (map f).toLinearMap ∘ₗ ι R = ι R ∘ₗ f :=
+  CliffordAlgebra.map_comp_ι _
+
+@[simp]
+theorem map_apply_ι (f : M →ₗ[R] N) (m : M) : map f (ι R m) = ι R (f m) :=
+  CliffordAlgebra.map_apply_ι _ m
+
+@[simp]
+theorem map_apply_ιMulti {n : ℕ} (f : M →ₗ[R] N) (m : Fin n → M) :
+    map f (ιMulti R n m) = ιMulti R n (f ∘ m) := by
+  rw [ιMulti_apply, ιMulti_apply, map_list_prod]
+  simp only [List.map_ofFn, Function.comp, map_apply_ι]
+
+@[simp]
+theorem map_comp_ιMulti {n : ℕ} (f : M →ₗ[R] N) :
+    (map f).toLinearMap.compAlternatingMap (ιMulti R n (M := M)) =
+    (ιMulti R n (M := N)).compLinearMap f := by
+  ext m
+  exact map_apply_ιMulti _ _
+
+@[simp]
+theorem map_id :
+    map LinearMap.id = AlgHom.id R (ExteriorAlgebra R M) :=
+  CliffordAlgebra.map_id 0
+
+@[simp]
+theorem map_comp_map (f : M →ₗ[R] N) (g : N →ₗ[R] N') :
+    AlgHom.comp (map g) (map f) = map (LinearMap.comp g f) :=
+  CliffordAlgebra.map_comp_map _ _
+
+@[simp]
+theorem ι_range_map_map (f : M →ₗ[R] N) :
+    Submodule.map (AlgHom.toLinearMap (map f)) (LinearMap.range (ι R (M := M))) =
+    Submodule.map (ι R) (LinearMap.range f) :=
+  CliffordAlgebra.ι_range_map_map _
+
+theorem toTrivSqZeroExt_comp_map [Module Rᵐᵒᵖ M] [IsCentralScalar R M] [Module Rᵐᵒᵖ N]
+    [IsCentralScalar R N] (f : M →ₗ[R] N) :
+    toTrivSqZeroExt.comp (map f) = (TrivSqZeroExt.map f).comp toTrivSqZeroExt := by
+  apply hom_ext
+  apply LinearMap.ext
+  simp only [AlgHom.comp_toLinearMap, LinearMap.coe_comp, Function.comp_apply,
+    AlgHom.toLinearMap_apply, map_apply_ι, toTrivSqZeroExt_ι, TrivSqZeroExt.map_inr, forall_const]
+
+theorem ιInv_comp_map (f : M →ₗ[R] N) :
+    ιInv.comp (map f).toLinearMap = f.comp ιInv := by
+  letI : Module Rᵐᵒᵖ M := Module.compHom _ ((RingHom.id R).fromOpposite mul_comm)
+  haveI : IsCentralScalar R M := ⟨fun r m => rfl⟩
+  letI : Module Rᵐᵒᵖ N := Module.compHom _ ((RingHom.id R).fromOpposite mul_comm)
+  haveI : IsCentralScalar R N := ⟨fun r m => rfl⟩
+  unfold ιInv
+  conv_lhs => rw [LinearMap.comp_assoc, ← AlgHom.comp_toLinearMap, toTrivSqZeroExt_comp_map,
+                AlgHom.comp_toLinearMap, ← LinearMap.comp_assoc, TrivSqZeroExt.sndHom_comp_map]
+
+open Function in
+/-- For a linear map `f` from `M` to `N`,
+`ExteriorAlgebra.map g` is a retraction of `ExteriorAlgebra.map f` iff
+`g` is a retraction of `f`. -/
+@[simp]
+lemma leftInverse_map_iff {f : M →ₗ[R] N} {g : N →ₗ[R] M} :
+    LeftInverse (map g) (map f) ↔ LeftInverse g f := by
+  refine ⟨fun h x => ?_, fun h => CliffordAlgebra.leftInverse_map_of_leftInverse _ _ h⟩
+  simpa using h (ι _ x)
+
+/-- A morphism of modules that admits a linear retraction induces an injective morphism of
+exterior algebras. -/
+lemma map_injective {f : M →ₗ[R] N} (hf : ∃ (g : N →ₗ[R] M), g.comp f = LinearMap.id) :
+    Function.Injective (map f) :=
+  let ⟨_, hgf⟩ := hf; (leftInverse_map_iff.mpr (DFunLike.congr_fun hgf)).injective
+
+/-- A morphism of modules is surjective if and only the morphism of exterior algebras that it
+induces is surjective. -/
+@[simp]
+lemma map_surjective_iff {f : M →ₗ[R] N} :
+    Function.Surjective (map f) ↔ Function.Surjective f := by
+  refine ⟨fun h y ↦ ?_, fun h ↦ CliffordAlgebra.map_surjective _ h⟩
+  obtain ⟨x, hx⟩ := h (ι R y)
+  existsi ιInv x
+  rw [← LinearMap.comp_apply, ← ιInv_comp_map, LinearMap.comp_apply]
+  erw [hx, ExteriorAlgebra.ι_leftInverse]
+
+variable {K E F : Type*} [Field K] [AddCommGroup E]
+  [Module K E] [AddCommGroup F] [Module K F]
+
+/-- An injective morphism of vector spaces induces an injective morphism of exterior algebras. -/
+lemma map_injective_field {f : E →ₗ[K] F} (hf : LinearMap.ker f = ⊥) :
+    Function.Injective (map f) :=
+  map_injective (LinearMap.exists_leftInverse_of_injective f hf)
+
 end ExteriorAlgebra
 
 namespace TensorAlgebra
chore(*): replace $ with <| (#9319)

See Zulip thread for the discussion.

Diff
@@ -263,7 +263,7 @@ theorem ι_mul_prod_list {n : ℕ} (f : Fin n → M) (i : Fin n) :
     by_cases h : i = 0
     · rw [h, ι_sq_zero, zero_mul]
     · replace hn :=
-        congr_arg (ι R (f 0) * ·) $ hn (fun i => f <| Fin.succ i) (i.pred h)
+        congr_arg (ι R (f 0) * ·) <| hn (fun i => f <| Fin.succ i) (i.pred h)
       simp only at hn
       rw [Fin.succ_pred, ← mul_assoc, mul_zero] at hn
       refine' (eq_zero_iff_eq_zero_of_add_eq_zero _).mp hn
feat: define QuadraticForm.IsOrtho as Q (x + y) = Q x + Q y (#9141)

This includes some basic API, and the connection with BilinForm.IsOrtho.

The motivation for this definition are the results about vectors commuting in a clifford algebra.

Diff
@@ -252,9 +252,7 @@ theorem ι_range_disjoint_one :
 
 @[simp]
 theorem ι_add_mul_swap (x y : M) : ι R x * ι R y + ι R y * ι R x = 0 :=
-  calc
-    _ = ι R (y + x) * ι R (y + x) := by simp [mul_add, add_mul]
-    _ = _ := ι_sq_zero _
+  CliffordAlgebra.ι_mul_ι_add_swap_of_isOrtho <| .all _ _
 #align exterior_algebra.ι_add_mul_swap ExteriorAlgebra.ι_add_mul_swap
 
 theorem ι_mul_prod_list {n : ℕ} (f : Fin n → M) (i : Fin n) :
chore: Replace (· op ·) a by (a op ·) (#8843)

I used the regex \(\(· (.) ·\) (.)\), replacing with ($2 $1 ·).

Diff
@@ -265,8 +265,7 @@ theorem ι_mul_prod_list {n : ℕ} (f : Fin n → M) (i : Fin n) :
     by_cases h : i = 0
     · rw [h, ι_sq_zero, zero_mul]
     · replace hn :=
-        congr_arg
-          ((· * ·) <| ι R <| f 0) (hn (fun i => f <| Fin.succ i) (i.pred h))
+        congr_arg (ι R (f 0) * ·) $ hn (fun i => f <| Fin.succ i) (i.pred h)
       simp only at hn
       rw [Fin.succ_pred, ← mul_assoc, mul_zero] at hn
       refine' (eq_zero_iff_eq_zero_of_add_eq_zero _).mp hn
chore: introduce notation for AlternatingMap (#8697)

Use M [Λ^ι]→ₗ[R] N for AlternatingMap R M N ι, similarly to the existing notation M [Λ^ι]→L[R] N for ContinuousAlternatingMap R M N ι.

Diff
@@ -279,7 +279,7 @@ variable (R)
 
 This is a special case of `MultilinearMap.mkPiAlgebraFin`, and the exterior algebra version of
 `TensorAlgebra.tprod`. -/
-def ιMulti (n : ℕ) : AlternatingMap R M (ExteriorAlgebra R M) (Fin n) :=
+def ιMulti (n : ℕ) : M [Λ^Fin n]→ₗ[R] ExteriorAlgebra R M :=
   let F := (MultilinearMap.mkPiAlgebraFin R n (ExteriorAlgebra R M)).compLinearMap fun _ => ι R
   { F with
     map_eq_zero_of_eq' := fun f x y hfxy hxy => by
perf(FunLike.Basic): beta reduce CoeFun.coe (#7905)

This eliminates (fun a ↦ β) α in the type when applying a FunLike.

Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -138,7 +138,7 @@ theorem induction {C : ExteriorAlgebra R M → Prop}
 
 /-- The left-inverse of `algebraMap`. -/
 def algebraMapInv : ExteriorAlgebra R M →ₐ[R] R :=
-  ExteriorAlgebra.lift R ⟨(0 : M →ₗ[R] R), fun m => by simp⟩
+  ExteriorAlgebra.lift R ⟨(0 : M →ₗ[R] R), fun _ => by simp⟩
 #align exterior_algebra.algebra_map_inv ExteriorAlgebra.algebraMapInv
 
 variable (M)
feat: Nontrivial instances for ExteriorAlgebra, CliffordAlgebra (#7985)

Using methods suggested by @eric-wieser Zulip discussion

Diff
@@ -333,6 +333,10 @@ theorem ιMulti_succ_curryLeft {n : ℕ} (m : M) :
       rfl
 #align exterior_algebra.ι_multi_succ_curry_left ExteriorAlgebra.ιMulti_succ_curryLeft
 
+/-- An `ExteriorAlgebra` over a nontrivial ring is nontrivial. -/
+instance [Nontrivial R] : Nontrivial (ExteriorAlgebra R M) :=
+  (algebraMap_leftInverse M).injective.nontrivial
+
 end ExteriorAlgebra
 
 namespace TensorAlgebra
chore(LinearAlgebra/Alternating): split (#7448)

I'm going to refactor/expand API about domCoprod, and I don't want to rebuild the whole library when I do it.

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhangir Azerbayev, Adam Topaz, Eric Wieser
 -/
 import Mathlib.LinearAlgebra.CliffordAlgebra.Basic
-import Mathlib.LinearAlgebra.Alternating
+import Mathlib.LinearAlgebra.Alternating.Basic
 
 #align_import linear_algebra.exterior_algebra.basic from "leanprover-community/mathlib"@"b8d2eaa69d69ce8f03179a5cda774fc0cde984e4"
 
chore: drop MulZeroClass. in mul_zero/zero_mul (#6682)

Search&replace MulZeroClass.mul_zero -> mul_zero, MulZeroClass.zero_mul -> zero_mul.

These were introduced by Mathport, as the full name of mul_zero is actually MulZeroClass.mul_zero (it's exported with the short name).

Diff
@@ -263,14 +263,14 @@ theorem ι_mul_prod_list {n : ℕ} (f : Fin n → M) (i : Fin n) :
   · exact i.elim0
   · rw [List.ofFn_succ, List.prod_cons, ← mul_assoc]
     by_cases h : i = 0
-    · rw [h, ι_sq_zero, MulZeroClass.zero_mul]
+    · rw [h, ι_sq_zero, zero_mul]
     · replace hn :=
         congr_arg
           ((· * ·) <| ι R <| f 0) (hn (fun i => f <| Fin.succ i) (i.pred h))
       simp only at hn
-      rw [Fin.succ_pred, ← mul_assoc, MulZeroClass.mul_zero] at hn
+      rw [Fin.succ_pred, ← mul_assoc, mul_zero] at hn
       refine' (eq_zero_iff_eq_zero_of_add_eq_zero _).mp hn
-      rw [← add_mul, ι_add_mul_swap, MulZeroClass.zero_mul]
+      rw [← add_mul, ι_add_mul_swap, zero_mul]
 #align exterior_algebra.ι_mul_prod_list ExteriorAlgebra.ι_mul_prod_list
 
 variable (R)
@@ -297,7 +297,7 @@ def ιMulti (n : ℕ) : AlternatingMap R M (ExteriorAlgebra R M) (Fin n) :=
           rw [hfxy, ← Fin.succ_pred y (ne_of_lt h).symm]
           exact ι_mul_prod_list (f ∘ Fin.succ) _
         -- ignore the left-most term and induct on the remaining ones, decrementing indices
-        · convert MulZeroClass.mul_zero (ι R (f 0))
+        · convert mul_zero (ι R (f 0))
           refine'
             hn
               (fun i => f <| Fin.succ i) (x.pred hx)
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -74,7 +74,7 @@ theorem ι_sq_zero (m : M) : ι R m * ι R m = 0 :=
   (CliffordAlgebra.ι_sq_scalar _ m).trans <| map_zero _
 #align exterior_algebra.ι_sq_zero ExteriorAlgebra.ι_sq_zero
 
-variable {A : Type _} [Semiring A] [Algebra R A]
+variable {A : Type*} [Semiring A] [Algebra R A]
 
 -- @[simp] -- Porting note: simp can prove this
 theorem comp_ι_sq_zero (g : ExteriorAlgebra R M →ₐ[R] A) (m : M) : g (ι R m) * g (ι R m) = 0 := by
chore: bump to nightly-2023-07-15 (#5992)

Various adaptations to changes when Fin API was moved to Std. One notable change is that many lemmas are now stated in terms of i ≠ 0 (for i : Fin n) rather then i.1 ≠ 0, and as a consequence many Fin.vne_of_ne applications have been added or removed, mostly removed.

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

Diff
@@ -266,7 +266,7 @@ theorem ι_mul_prod_list {n : ℕ} (f : Fin n → M) (i : Fin n) :
     · rw [h, ι_sq_zero, MulZeroClass.zero_mul]
     · replace hn :=
         congr_arg
-          ((· * ·) <| ι R <| f 0) (hn (fun i => f <| Fin.succ i) (i.pred <| Fin.vne_of_ne h))
+          ((· * ·) <| ι R <| f 0) (hn (fun i => f <| Fin.succ i) (i.pred h))
       simp only at hn
       rw [Fin.succ_pred, ← mul_assoc, MulZeroClass.mul_zero] at hn
       refine' (eq_zero_iff_eq_zero_of_add_eq_zero _).mp hn
@@ -294,14 +294,14 @@ def ιMulti (n : ℕ) : AlternatingMap R M (ExteriorAlgebra R M) (Fin n) :=
         by_cases hx : x = 0
         -- one of the repeated terms is on the left
         · rw [hx] at hfxy h
-          rw [hfxy, ← Fin.succ_pred y (Fin.vne_of_ne <| (ne_of_lt h).symm)]
+          rw [hfxy, ← Fin.succ_pred y (ne_of_lt h).symm]
           exact ι_mul_prod_list (f ∘ Fin.succ) _
         -- ignore the left-most term and induct on the remaining ones, decrementing indices
         · convert MulZeroClass.mul_zero (ι R (f 0))
           refine'
             hn
-              (fun i => f <| Fin.succ i) (x.pred <| Fin.vne_of_ne hx)
-              (y.pred (Fin.vne_of_ne <| ne_of_lt <| lt_of_le_of_lt x.zero_le h).symm) _
+              (fun i => f <| Fin.succ i) (x.pred hx)
+              (y.pred (ne_of_lt <| lt_of_le_of_lt x.zero_le h).symm) _
               (Fin.pred_lt_pred_iff.mpr h)
           simp only [Fin.succ_pred]
           exact hfxy
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,15 +2,12 @@
 Copyright (c) 2020 Adam Topaz. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhangir Azerbayev, Adam Topaz, Eric Wieser
-
-! This file was ported from Lean 3 source module linear_algebra.exterior_algebra.basic
-! leanprover-community/mathlib commit b8d2eaa69d69ce8f03179a5cda774fc0cde984e4
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.LinearAlgebra.CliffordAlgebra.Basic
 import Mathlib.LinearAlgebra.Alternating
 
+#align_import linear_algebra.exterior_algebra.basic from "leanprover-community/mathlib"@"b8d2eaa69d69ce8f03179a5cda774fc0cde984e4"
+
 /-!
 # Exterior Algebras
 
chore: bump to nightly-2023-07-01 (#5409)

Open in Gitpod

Co-authored-by: Komyyy <pol_tta@outlook.jp> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -267,7 +267,9 @@ theorem ι_mul_prod_list {n : ℕ} (f : Fin n → M) (i : Fin n) :
   · rw [List.ofFn_succ, List.prod_cons, ← mul_assoc]
     by_cases h : i = 0
     · rw [h, ι_sq_zero, MulZeroClass.zero_mul]
-    · replace hn := congr_arg ((· * ·) <| ι R <| f 0) (hn (fun i => f <| Fin.succ i) (i.pred h))
+    · replace hn :=
+        congr_arg
+          ((· * ·) <| ι R <| f 0) (hn (fun i => f <| Fin.succ i) (i.pred <| Fin.vne_of_ne h))
       simp only at hn
       rw [Fin.succ_pred, ← mul_assoc, MulZeroClass.mul_zero] at hn
       refine' (eq_zero_iff_eq_zero_of_add_eq_zero _).mp hn
@@ -295,12 +297,15 @@ def ιMulti (n : ℕ) : AlternatingMap R M (ExteriorAlgebra R M) (Fin n) :=
         by_cases hx : x = 0
         -- one of the repeated terms is on the left
         · rw [hx] at hfxy h
-          rw [hfxy, ← Fin.succ_pred y (ne_of_lt h).symm]
+          rw [hfxy, ← Fin.succ_pred y (Fin.vne_of_ne <| (ne_of_lt h).symm)]
           exact ι_mul_prod_list (f ∘ Fin.succ) _
         -- ignore the left-most term and induct on the remaining ones, decrementing indices
         · convert MulZeroClass.mul_zero (ι R (f 0))
-          refine' hn (fun i => f <| Fin.succ i) (x.pred hx)
-            (y.pred (ne_of_lt <| lt_of_le_of_lt x.zero_le h).symm) _ (Fin.pred_lt_pred_iff.mpr h)
+          refine'
+            hn
+              (fun i => f <| Fin.succ i) (x.pred <| Fin.vne_of_ne hx)
+              (y.pred (Fin.vne_of_ne <| ne_of_lt <| lt_of_le_of_lt x.zero_le h).symm) _
+              (Fin.pred_lt_pred_iff.mpr h)
           simp only [Fin.succ_pred]
           exact hfxy
     toFun := F }
feat: port LinearAlgebra.ExteriorAlgebra.Basic (#5375)

Dependencies 10 + 631

632 files ported (98.4%)
267479 lines ported (98.7%)
Show graph

The unported dependencies are