l3lab/ntp-mathlib huggingface dataset:
/-- The product of `n` terms of the form `ι R m` is an alternating map.

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 :=
  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
      

Proof state:
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
n : ℕ
F : MultilinearMap R (fun x => M) (ExteriorAlgebra R M) :=
  MultilinearMap.compLinearMap (MultilinearMap.mkPiAlgebraFin R n (ExteriorAlgebra R M)) fun x => ι R
f : Fin n → M
x y : Fin n
hfxy : f x = f y
hxy : x ≠ y
⊢ MultilinearMap.toFun
      { toFun := ⇑F,
        map_add' :=
          (_ :
            ∀ [inst : DecidableEq (Fin n)] (m : Fin n → M) (i : Fin n) (x y : M),
              MultilinearMap.toFun F (Function.update m i (x + y)) =
                MultilinearMap.toFun F (Function.update m i x) + MultilinearMap.toFun F (Function.update m i y)),
        map_smul' :=
          (_ :
            ∀ [inst : DecidableEq (Fin n)] (m : Fin n → M) (i : Fin n) (c : R) (x : M),
              MultilinearMap.toFun F (Function.update m i (c • x)) =
                c • MultilinearMap.toFun F (Function.update m i x)) }
      f =
    0

Next tactic:
dsimp
/-- The product of `n` terms of the form `ι R m` is an alternating map.

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 :=
  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
      

Proof state:
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
n : ℕ
F : MultilinearMap R (fun x => M) (ExteriorAlgebra R M) :=
  MultilinearMap.compLinearMap (MultilinearMap.mkPiAlgebraFin R n (ExteriorAlgebra R M)) fun x => ι R
f : Fin n → M
x y : Fin n
hfxy : f x = f y
hxy : x ≠ y
⊢ List.prod (List.ofFn fun i => (ι R) (f i)) = 0

Next tactic:
clear F
/-- The product of `n` terms of the form `ι R m` is an alternating map.

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 :=
  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
      clear F
      

Proof state:
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
n : ℕ
f : Fin n → M
x y : Fin n
hfxy : f x = f y
hxy : x ≠ y
⊢ List.prod (List.ofFn fun i => (ι R) (f i)) = 0

Next tactic:
wlog h : x < y
/-- The product of `n` terms of the form `ι R m` is an alternating map.

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 :=
  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
      clear F
      wlog h : x < y
      · 

Proof state:
case inr
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
n : ℕ
f : Fin n → M
x y : Fin n
hfxy : f x = f y
hxy : x ≠ y
this :
  ∀ (R : Type u1) [inst : CommRing R] {M : Type u2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {A : Type u_1}
    [inst_3 : Semiring A] [inst_4 : Algebra R A] (n : ℕ) (f : Fin n → M) (x y : Fin n),
    f x = f y → x ≠ y → x < y → List.prod (List.ofFn fun i => (ι R) (f i)) = 0
h : ¬x < y
⊢ List.prod (List.ofFn fun i => (ι R) (f i)) = 0

Next tactic:
exact this R (A := A) n f y x hfxy.symm hxy.symm (hxy.lt_or_lt.resolve_left h)
/-- The product of `n` terms of the form `ι R m` is an alternating map.

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 :=
  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
      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)
      

Proof state:
R✝ : Type u1
inst✝⁷ : CommRing R✝
M✝ : Type u2
inst✝⁶ : AddCommGroup M✝
inst✝⁵ : Module R✝ M✝
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
n : ℕ
f : Fin n → M
x y : Fin n
hfxy : f x = f y
hxy : x ≠ y
h : x < y
⊢ List.prod (List.ofFn fun i => (ι R) (f i)) = 0

Next tactic:
clear hxy
/-- The product of `n` terms of the form `ι R m` is an alternating map.

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 :=
  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
      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)
      clear hxy
      

Proof state:
R✝ : Type u1
inst✝⁷ : CommRing R✝
M✝ : Type u2
inst✝⁶ : AddCommGroup M✝
inst✝⁵ : Module R✝ M✝
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
n : ℕ
f : Fin n → M
x y : Fin n
hfxy : f x = f y
h : x < y
⊢ List.prod (List.ofFn fun i => (ι R) (f i)) = 0

Next tactic:
induction' n with n hn
/-- The product of `n` terms of the form `ι R m` is an alternating map.

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 :=
  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
      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)
      clear hxy
      induction' n with n hn
      · 

Proof state:
case zero
R✝ : Type u1
inst✝⁷ : CommRing R✝
M✝ : Type u2
inst✝⁶ : AddCommGroup M✝
inst✝⁵ : Module R✝ M✝
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
f : Fin Nat.zero → M
x y : Fin Nat.zero
hfxy : f x = f y
h : x < y
⊢ List.prod (List.ofFn fun i => (ι R) (f i)) = 0

Next tactic:
exact x.elim0
/-- The product of `n` terms of the form `ι R m` is an alternating map.

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 :=
  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
      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)
      clear hxy
      induction' n with n hn
      · exact x.elim0
      · 

Proof state:
case succ
R✝ : Type u1
inst✝⁷ : CommRing R✝
M✝ : Type u2
inst✝⁶ : AddCommGroup M✝
inst✝⁵ : Module R✝ M✝
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
n : ℕ
hn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => (ι R) (f i)) = 0
f : Fin (Nat.succ n) → M
x y : Fin (Nat.succ n)
hfxy : f x = f y
h : x < y
⊢ List.prod (List.ofFn fun i => (ι R) (f i)) = 0

Next tactic:
rw [List.ofFn_succ, List.prod_cons]
/-- The product of `n` terms of the form `ι R m` is an alternating map.

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 :=
  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
      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)
      clear hxy
      induction' n with n hn
      · exact x.elim0
      · rw [List.ofFn_succ, List.prod_cons]
        

Proof state:
case succ
R✝ : Type u1
inst✝⁷ : CommRing R✝
M✝ : Type u2
inst✝⁶ : AddCommGroup M✝
inst✝⁵ : Module R✝ M✝
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
n : ℕ
hn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => (ι R) (f i)) = 0
f : Fin (Nat.succ n) → M
x y : Fin (Nat.succ n)
hfxy : f x = f y
h : x < y
⊢ (ι R) (f 0) * List.prod (List.ofFn fun i => (ι R) (f (Fin.succ i))) = 0

Next tactic:
by_cases hx : x = 0
/-- The product of `n` terms of the form `ι R m` is an alternating map.

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 :=
  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
      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)
      clear hxy
      induction' n with n hn
      · exact x.elim0
      · rw [List.ofFn_succ, List.prod_cons]
        by_cases hx : x = 0
        -- one of the repeated terms is on the left
        · 

Proof state:
case pos
R✝ : Type u1
inst✝⁷ : CommRing R✝
M✝ : Type u2
inst✝⁶ : AddCommGroup M✝
inst✝⁵ : Module R✝ M✝
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
n : ℕ
hn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => (ι R) (f i)) = 0
f : Fin (Nat.succ n) → M
x y : Fin (Nat.succ n)
hfxy : f x = f y
h : x < y
hx : x = 0
⊢ (ι R) (f 0) * List.prod (List.ofFn fun i => (ι R) (f (Fin.succ i))) = 0

Next tactic:
rw [hx] at hfxy h
/-- The product of `n` terms of the form `ι R m` is an alternating map.

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 :=
  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
      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)
      clear hxy
      induction' n with n hn
      · exact x.elim0
      · rw [List.ofFn_succ, List.prod_cons]
        by_cases hx : x = 0
        -- one of the repeated terms is on the left
        · rw [hx] at hfxy h
          

Proof state:
case pos
R✝ : Type u1
inst✝⁷ : CommRing R✝
M✝ : Type u2
inst✝⁶ : AddCommGroup M✝
inst✝⁵ : Module R✝ M✝
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
n : ℕ
hn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => (ι R) (f i)) = 0
f : Fin (Nat.succ n) → M
x y : Fin (Nat.succ n)
hfxy : f 0 = f y
h : 0 < y
hx : x = 0
⊢ (ι R) (f 0) * List.prod (List.ofFn fun i => (ι R) (f (Fin.succ i))) = 0

Next tactic:
rw [hfxy, ← Fin.succ_pred y (ne_of_lt h).symm]
/-- The product of `n` terms of the form `ι R m` is an alternating map.

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 :=
  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
      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)
      clear hxy
      induction' n with n hn
      · exact x.elim0
      · rw [List.ofFn_succ, List.prod_cons]
        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]
          

Proof state:
case pos
R✝ : Type u1
inst✝⁷ : CommRing R✝
M✝ : Type u2
inst✝⁶ : AddCommGroup M✝
inst✝⁵ : Module R✝ M✝
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
n : ℕ
hn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => (ι R) (f i)) = 0
f : Fin (Nat.succ n) → M
x y : Fin (Nat.succ n)
hfxy : f 0 = f y
h : 0 < y
hx : x = 0
⊢ (ι R) (f (Fin.succ (Fin.pred y (_ : y ≠ 0)))) * List.prod (List.ofFn fun i => (ι R) (f (Fin.succ i))) = 0

Next tactic:
exact ι_mul_prod_list (f ∘ Fin.succ) _
/-- The product of `n` terms of the form `ι R m` is an alternating map.

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 :=
  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
      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)
      clear hxy
      induction' n with n hn
      · exact x.elim0
      · rw [List.ofFn_succ, List.prod_cons]
        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]
          exact ι_mul_prod_list (f ∘ Fin.succ) _
        -- ignore the left-most term and induct on the remaining ones, decrementing indices
        · 

Proof state:
case neg
R✝ : Type u1
inst✝⁷ : CommRing R✝
M✝ : Type u2
inst✝⁶ : AddCommGroup M✝
inst✝⁵ : Module R✝ M✝
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
n : ℕ
hn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => (ι R) (f i)) = 0
f : Fin (Nat.succ n) → M
x y : Fin (Nat.succ n)
hfxy : f x = f y
h : x < y
hx : ¬x = 0
⊢ (ι R) (f 0) * List.prod (List.ofFn fun i => (ι R) (f (Fin.succ i))) = 0

Next tactic:
convert mul_zero (ι R (f 0))
/-- The product of `n` terms of the form `ι R m` is an alternating map.

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 :=
  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
      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)
      clear hxy
      induction' n with n hn
      · exact x.elim0
      · rw [List.ofFn_succ, List.prod_cons]
        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]
          exact ι_mul_prod_list (f ∘ Fin.succ) _
        -- ignore the left-most term and induct on the remaining ones, decrementing indices
        · convert mul_zero (ι R (f 0))
          

Proof state:
case h.e'_2.h.e'_6
R✝ : Type u1
inst✝⁷ : CommRing R✝
M✝ : Type u2
inst✝⁶ : AddCommGroup M✝
inst✝⁵ : Module R✝ M✝
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
n : ℕ
hn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => (ι R) (f i)) = 0
f : Fin (Nat.succ n) → M
x y : Fin (Nat.succ n)
hfxy : f x = f y
h : x < y
hx : ¬x = 0
⊢ List.prod (List.ofFn fun i => (ι R) (f (Fin.succ i))) = 0

Next tactic:
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)
/-- The product of `n` terms of the form `ι R m` is an alternating map.

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 :=
  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
      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)
      clear hxy
      induction' n with n hn
      · exact x.elim0
      · rw [List.ofFn_succ, List.prod_cons]
        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]
          exact ι_mul_prod_list (f ∘ Fin.succ) _
        -- ignore the left-most term and induct on the remaining ones, decrementing indices
        · convert 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)
          

Proof state:
case h.e'_2.h.e'_6
R✝ : Type u1
inst✝⁷ : CommRing R✝
M✝ : Type u2
inst✝⁶ : AddCommGroup M✝
inst✝⁵ : Module R✝ M✝
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
n : ℕ
hn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => (ι R) (f i)) = 0
f : Fin (Nat.succ n) → M
x y : Fin (Nat.succ n)
hfxy : f x = f y
h : x < y
hx : ¬x = 0
⊢ (fun i => f (Fin.succ i)) (Fin.pred x hx) = (fun i => f (Fin.succ i)) (Fin.pred y (_ : y ≠ 0))

Next tactic:
simp only [Fin.succ_pred]
/-- The product of `n` terms of the form `ι R m` is an alternating map.

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 :=
  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
      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)
      clear hxy
      induction' n with n hn
      · exact x.elim0
      · rw [List.ofFn_succ, List.prod_cons]
        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]
          exact ι_mul_prod_list (f ∘ Fin.succ) _
        -- ignore the left-most term and induct on the remaining ones, decrementing indices
        · convert 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)
          simp only [Fin.succ_pred]
          

Proof state:
case h.e'_2.h.e'_6
R✝ : Type u1
inst✝⁷ : CommRing R✝
M✝ : Type u2
inst✝⁶ : AddCommGroup M✝
inst✝⁵ : Module R✝ M✝
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
n : ℕ
hn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => (ι R) (f i)) = 0
f : Fin (Nat.succ n) → M
x y : Fin (Nat.succ n)
hfxy : f x = f y
h : x < y
hx : ¬x = 0
⊢ f x = f y

Next tactic:
exact hfxy
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 =>
    (ιMulti_succ_apply _).trans <| by
      

Proof state:
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
n : ℕ
m : M
v : Fin n → M
⊢ (ι R) (Matrix.vecCons m v 0) * (ιMulti R n) (Matrix.vecTail (Matrix.vecCons m v)) =
    ((LinearMap.compAlternatingMap (LinearMap.mulLeft R ((ι R) m))) (ιMulti R n)) v

Next tactic:
simp_rw [Matrix.tail_cons]
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 =>
    (ιMulti_succ_apply _).trans <| by
      simp_rw [Matrix.tail_cons]
      

Proof state:
R : Type u1
inst✝⁴ : CommRing R
M : Type u2
inst✝³ : AddCommGroup M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
n : ℕ
m : M
v : Fin n → M
⊢ (ι R) (Matrix.vecCons m v 0) * (ιMulti R n) v =
    ((LinearMap.compAlternatingMap (LinearMap.mulLeft R ((ι R) m))) (ιMulti R n)) v

Next tactic:
rfl
@[simp]
theorem toExterior_ι (m : M) :
    TensorAlgebra.toExterior (TensorAlgebra.ι R m) = ExteriorAlgebra.ι R m := by
  

Proof state:
R : Type u1
inst✝² : CommRing R
M : Type u2
inst✝¹ : AddCommGroup M
inst✝ : Module R M
m : M
⊢ toExterior ((ι R) m) = (ExteriorAlgebra.ι R) m

Next tactic:
simp [toExterior]
instance (priority := 100) HeytingHomClass.toBoundedLatticeHomClass [HeytingAlgebra α]
    { _ : HeytingAlgebra β} [HeytingHomClass F α β] : BoundedLatticeHomClass F α β :=
  { ‹HeytingHomClass F α β› with
    map_top := fun f => by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
inst✝¹ : HeytingAlgebra α
x✝ : HeytingAlgebra β
inst✝ : HeytingHomClass F α β
src✝ : HeytingHomClass F α β := inst✝
f : F
⊢ f ⊤ = ⊤

Next tactic:
rw [← @himp_self α _ ⊥, ← himp_self, map_himp]
instance (priority := 100) CoheytingHomClass.toBoundedLatticeHomClass [CoheytingAlgebra α]
    { _ : CoheytingAlgebra β} [CoheytingHomClass F α β] : BoundedLatticeHomClass F α β :=
  { ‹CoheytingHomClass F α β› with
    map_bot := fun f => by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
inst✝¹ : CoheytingAlgebra α
x✝ : CoheytingAlgebra β
inst✝ : CoheytingHomClass F α β
src✝ : CoheytingHomClass F α β := inst✝
f : F
⊢ f ⊥ = ⊥

Next tactic:
rw [← @sdiff_self α _ ⊤, ← sdiff_self, map_sdiff]
instance (priority := 100) BiheytingHomClass.toHeytingHomClass [BiheytingAlgebra α]
    { _ : BiheytingAlgebra β} [BiheytingHomClass F α β] : HeytingHomClass F α β :=
  { ‹BiheytingHomClass F α β› with
    map_bot := fun f => by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
inst✝¹ : BiheytingAlgebra α
x✝ : BiheytingAlgebra β
inst✝ : BiheytingHomClass F α β
src✝ : BiheytingHomClass F α β := inst✝
f : F
⊢ f ⊥ = ⊥

Next tactic:
rw [← @sdiff_self α _ ⊤, ← sdiff_self, BiheytingHomClass.map_sdiff]
instance (priority := 100) BiheytingHomClass.toCoheytingHomClass [BiheytingAlgebra α]
    { _ : BiheytingAlgebra β} [BiheytingHomClass F α β] : CoheytingHomClass F α β :=
  { ‹BiheytingHomClass F α β› with
    map_top := fun f => by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
inst✝¹ : BiheytingAlgebra α
x✝ : BiheytingAlgebra β
inst✝ : BiheytingHomClass F α β
src✝ : BiheytingHomClass F α β := inst✝
f : F
⊢ f ⊤ = ⊤

Next tactic:
rw [← @himp_self α _ ⊥, ← himp_self, map_himp]