l3lab/ntp-mathlib huggingface dataset:
instance : PseudoMetricSpace (Hamming β) where
  dist_self := by
    push_cast
    exact mod_cast hammingDist_self
  dist_comm := by
    push_cast
    exact mod_cast hammingDist_comm
  dist_triangle := by
    push_cast
    exact mod_cast hammingDist_triangle
  edist_dist _ _ := by exact ENNReal.coe_nnreal_eq _
  toUniformSpace := ⊥
  uniformity_dist := uniformity_dist_of_mem_uniformity _ _ fun s => by
    

Proof state:
α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝¹ : Fintype ι
inst✝ : (i : ι) → DecidableEq (β i)
s : Set (Hamming β × Hamming β)
⊢ s ∈ uniformity (Hamming β) ↔ ∃ ε > 0, ∀ {a b : Hamming β}, dist a b < ε → (a, b) ∈ s

Next tactic:
push_cast
instance : PseudoMetricSpace (Hamming β) where
  dist_self := by
    push_cast
    exact mod_cast hammingDist_self
  dist_comm := by
    push_cast
    exact mod_cast hammingDist_comm
  dist_triangle := by
    push_cast
    exact mod_cast hammingDist_triangle
  edist_dist _ _ := by exact ENNReal.coe_nnreal_eq _
  toUniformSpace := ⊥
  uniformity_dist := uniformity_dist_of_mem_uniformity _ _ fun s => by
    push_cast
    

Proof state:
α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝¹ : Fintype ι
inst✝ : (i : ι) → DecidableEq (β i)
s : Set (Hamming β × Hamming β)
⊢ s ∈ uniformity (Hamming β) ↔ ∃ ε > 0, ∀ {a b : Hamming β}, ↑(hammingDist (ofHamming a) (ofHamming b)) < ε → (a, b) ∈ s

Next tactic:
constructor
instance : PseudoMetricSpace (Hamming β) where
  dist_self := by
    push_cast
    exact mod_cast hammingDist_self
  dist_comm := by
    push_cast
    exact mod_cast hammingDist_comm
  dist_triangle := by
    push_cast
    exact mod_cast hammingDist_triangle
  edist_dist _ _ := by exact ENNReal.coe_nnreal_eq _
  toUniformSpace := ⊥
  uniformity_dist := uniformity_dist_of_mem_uniformity _ _ fun s => by
    push_cast
    constructor
    · 

Proof state:
case mp
α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝¹ : Fintype ι
inst✝ : (i : ι) → DecidableEq (β i)
s : Set (Hamming β × Hamming β)
⊢ s ∈ uniformity (Hamming β) → ∃ ε > 0, ∀ {a b : Hamming β}, ↑(hammingDist (ofHamming a) (ofHamming b)) < ε → (a, b) ∈ s

Next tactic:
refine' fun hs => ⟨1, zero_lt_one, fun hab => _⟩
instance : PseudoMetricSpace (Hamming β) where
  dist_self := by
    push_cast
    exact mod_cast hammingDist_self
  dist_comm := by
    push_cast
    exact mod_cast hammingDist_comm
  dist_triangle := by
    push_cast
    exact mod_cast hammingDist_triangle
  edist_dist _ _ := by exact ENNReal.coe_nnreal_eq _
  toUniformSpace := ⊥
  uniformity_dist := uniformity_dist_of_mem_uniformity _ _ fun s => by
    push_cast
    constructor
    · refine' fun hs => ⟨1, zero_lt_one, fun hab => _⟩
      

Proof state:
case mp
α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝¹ : Fintype ι
inst✝ : (i : ι) → DecidableEq (β i)
s : Set (Hamming β × Hamming β)
hs : s ∈ uniformity (Hamming β)
a✝ b✝ : Hamming β
hab : ↑(hammingDist (ofHamming a✝) (ofHamming b✝)) < 1
⊢ (a✝, b✝) ∈ s

Next tactic:
rw_mod_cast [hammingDist_lt_one] at hab
instance : PseudoMetricSpace (Hamming β) where
  dist_self := by
    push_cast
    exact mod_cast hammingDist_self
  dist_comm := by
    push_cast
    exact mod_cast hammingDist_comm
  dist_triangle := by
    push_cast
    exact mod_cast hammingDist_triangle
  edist_dist _ _ := by exact ENNReal.coe_nnreal_eq _
  toUniformSpace := ⊥
  uniformity_dist := uniformity_dist_of_mem_uniformity _ _ fun s => by
    push_cast
    constructor
    · refine' fun hs => ⟨1, zero_lt_one, fun hab => _⟩
      rw_mod_cast [hammingDist_lt_one] at hab
      

Proof state:
case mp
α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝¹ : Fintype ι
inst✝ : (i : ι) → DecidableEq (β i)
s : Set (Hamming β × Hamming β)
hs : s ∈ uniformity (Hamming β)
a✝ b✝ : Hamming β
hab : ofHamming a✝ = ofHamming b✝
⊢ (a✝, b✝) ∈ s

Next tactic:
rw [ofHamming_inj, ← mem_idRel] at hab
instance : PseudoMetricSpace (Hamming β) where
  dist_self := by
    push_cast
    exact mod_cast hammingDist_self
  dist_comm := by
    push_cast
    exact mod_cast hammingDist_comm
  dist_triangle := by
    push_cast
    exact mod_cast hammingDist_triangle
  edist_dist _ _ := by exact ENNReal.coe_nnreal_eq _
  toUniformSpace := ⊥
  uniformity_dist := uniformity_dist_of_mem_uniformity _ _ fun s => by
    push_cast
    constructor
    · refine' fun hs => ⟨1, zero_lt_one, fun hab => _⟩
      rw_mod_cast [hammingDist_lt_one] at hab
      rw [ofHamming_inj, ← mem_idRel] at hab
      

Proof state:
case mp
α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝¹ : Fintype ι
inst✝ : (i : ι) → DecidableEq (β i)
s : Set (Hamming β × Hamming β)
hs : s ∈ uniformity (Hamming β)
a✝ b✝ : Hamming β
hab : (a✝, b✝) ∈ idRel
⊢ (a✝, b✝) ∈ s

Next tactic:
exact hs hab
instance : PseudoMetricSpace (Hamming β) where
  dist_self := by
    push_cast
    exact mod_cast hammingDist_self
  dist_comm := by
    push_cast
    exact mod_cast hammingDist_comm
  dist_triangle := by
    push_cast
    exact mod_cast hammingDist_triangle
  edist_dist _ _ := by exact ENNReal.coe_nnreal_eq _
  toUniformSpace := ⊥
  uniformity_dist := uniformity_dist_of_mem_uniformity _ _ fun s => by
    push_cast
    constructor
    · refine' fun hs => ⟨1, zero_lt_one, fun hab => _⟩
      rw_mod_cast [hammingDist_lt_one] at hab
      rw [ofHamming_inj, ← mem_idRel] at hab
      exact hs hab
    · 

Proof state:
case mpr
α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝¹ : Fintype ι
inst✝ : (i : ι) → DecidableEq (β i)
s : Set (Hamming β × Hamming β)
⊢ (∃ ε > 0, ∀ {a b : Hamming β}, ↑(hammingDist (ofHamming a) (ofHamming b)) < ε → (a, b) ∈ s) →
    s ∈ uniformity (Hamming β)

Next tactic:
rintro ⟨_, hε, hs⟩ ⟨_, _⟩ hab
instance : PseudoMetricSpace (Hamming β) where
  dist_self := by
    push_cast
    exact mod_cast hammingDist_self
  dist_comm := by
    push_cast
    exact mod_cast hammingDist_comm
  dist_triangle := by
    push_cast
    exact mod_cast hammingDist_triangle
  edist_dist _ _ := by exact ENNReal.coe_nnreal_eq _
  toUniformSpace := ⊥
  uniformity_dist := uniformity_dist_of_mem_uniformity _ _ fun s => by
    push_cast
    constructor
    · refine' fun hs => ⟨1, zero_lt_one, fun hab => _⟩
      rw_mod_cast [hammingDist_lt_one] at hab
      rw [ofHamming_inj, ← mem_idRel] at hab
      exact hs hab
    · rintro ⟨_, hε, hs⟩ ⟨_, _⟩ hab
      

Proof state:
case mpr.intro.intro.mk
α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝¹ : Fintype ι
inst✝ : (i : ι) → DecidableEq (β i)
s : Set (Hamming β × Hamming β)
w✝ : ℝ
hε : w✝ > 0
hs : ∀ {a b : Hamming β}, ↑(hammingDist (ofHamming a) (ofHamming b)) < w✝ → (a, b) ∈ s
fst✝ snd✝ : Hamming β
hab : (fst✝, snd✝) ∈ idRel
⊢ (fst✝, snd✝) ∈ s

Next tactic:
rw [mem_idRel] at hab
instance : PseudoMetricSpace (Hamming β) where
  dist_self := by
    push_cast
    exact mod_cast hammingDist_self
  dist_comm := by
    push_cast
    exact mod_cast hammingDist_comm
  dist_triangle := by
    push_cast
    exact mod_cast hammingDist_triangle
  edist_dist _ _ := by exact ENNReal.coe_nnreal_eq _
  toUniformSpace := ⊥
  uniformity_dist := uniformity_dist_of_mem_uniformity _ _ fun s => by
    push_cast
    constructor
    · refine' fun hs => ⟨1, zero_lt_one, fun hab => _⟩
      rw_mod_cast [hammingDist_lt_one] at hab
      rw [ofHamming_inj, ← mem_idRel] at hab
      exact hs hab
    · rintro ⟨_, hε, hs⟩ ⟨_, _⟩ hab
      rw [mem_idRel] at hab
      

Proof state:
case mpr.intro.intro.mk
α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝¹ : Fintype ι
inst✝ : (i : ι) → DecidableEq (β i)
s : Set (Hamming β × Hamming β)
w✝ : ℝ
hε : w✝ > 0
hs : ∀ {a b : Hamming β}, ↑(hammingDist (ofHamming a) (ofHamming b)) < w✝ → (a, b) ∈ s
fst✝ snd✝ : Hamming β
hab : fst✝ = snd✝
⊢ (fst✝, snd✝) ∈ s

Next tactic:
rw [hab]
instance : PseudoMetricSpace (Hamming β) where
  dist_self := by
    push_cast
    exact mod_cast hammingDist_self
  dist_comm := by
    push_cast
    exact mod_cast hammingDist_comm
  dist_triangle := by
    push_cast
    exact mod_cast hammingDist_triangle
  edist_dist _ _ := by exact ENNReal.coe_nnreal_eq _
  toUniformSpace := ⊥
  uniformity_dist := uniformity_dist_of_mem_uniformity _ _ fun s => by
    push_cast
    constructor
    · refine' fun hs => ⟨1, zero_lt_one, fun hab => _⟩
      rw_mod_cast [hammingDist_lt_one] at hab
      rw [ofHamming_inj, ← mem_idRel] at hab
      exact hs hab
    · rintro ⟨_, hε, hs⟩ ⟨_, _⟩ hab
      rw [mem_idRel] at hab
      rw [hab]
      

Proof state:
case mpr.intro.intro.mk
α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝¹ : Fintype ι
inst✝ : (i : ι) → DecidableEq (β i)
s : Set (Hamming β × Hamming β)
w✝ : ℝ
hε : w✝ > 0
hs : ∀ {a b : Hamming β}, ↑(hammingDist (ofHamming a) (ofHamming b)) < w✝ → (a, b) ∈ s
fst✝ snd✝ : Hamming β
hab : fst✝ = snd✝
⊢ (snd✝, snd✝) ∈ s

Next tactic:
refine' hs (lt_of_eq_of_lt _ hε)
instance : PseudoMetricSpace (Hamming β) where
  dist_self := by
    push_cast
    exact mod_cast hammingDist_self
  dist_comm := by
    push_cast
    exact mod_cast hammingDist_comm
  dist_triangle := by
    push_cast
    exact mod_cast hammingDist_triangle
  edist_dist _ _ := by exact ENNReal.coe_nnreal_eq _
  toUniformSpace := ⊥
  uniformity_dist := uniformity_dist_of_mem_uniformity _ _ fun s => by
    push_cast
    constructor
    · refine' fun hs => ⟨1, zero_lt_one, fun hab => _⟩
      rw_mod_cast [hammingDist_lt_one] at hab
      rw [ofHamming_inj, ← mem_idRel] at hab
      exact hs hab
    · rintro ⟨_, hε, hs⟩ ⟨_, _⟩ hab
      rw [mem_idRel] at hab
      rw [hab]
      refine' hs (lt_of_eq_of_lt _ hε)
      

Proof state:
case mpr.intro.intro.mk
α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝¹ : Fintype ι
inst✝ : (i : ι) → DecidableEq (β i)
s : Set (Hamming β × Hamming β)
w✝ : ℝ
hε : w✝ > 0
hs : ∀ {a b : Hamming β}, ↑(hammingDist (ofHamming a) (ofHamming b)) < w✝ → (a, b) ∈ s
fst✝ snd✝ : Hamming β
hab : fst✝ = snd✝
⊢ ↑(hammingDist (ofHamming snd✝) (ofHamming snd✝)) = 0

Next tactic:
exact mod_cast hammingDist_self _
instance : PseudoMetricSpace (Hamming β) where
  dist_self := by
    push_cast
    exact mod_cast hammingDist_self
  dist_comm := by
    push_cast
    exact mod_cast hammingDist_comm
  dist_triangle := by
    push_cast
    exact mod_cast hammingDist_triangle
  edist_dist _ _ := by exact ENNReal.coe_nnreal_eq _
  toUniformSpace := ⊥
  uniformity_dist := uniformity_dist_of_mem_uniformity _ _ fun s => by
    push_cast
    constructor
    · refine' fun hs => ⟨1, zero_lt_one, fun hab => _⟩
      rw_mod_cast [hammingDist_lt_one] at hab
      rw [ofHamming_inj, ← mem_idRel] at hab
      exact hs hab
    · rintro ⟨_, hε, hs⟩ ⟨_, _⟩ hab
      rw [mem_idRel] at hab
      rw [hab]
      refine' hs (lt_of_eq_of_lt _ hε)
      exact mod_cast hammingDist_self _
  toBornology := ⟨⊥, bot_le⟩
  cobounded_sets := by
    

Proof state:
α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝¹ : Fintype ι
inst✝ : (i : ι) → DecidableEq (β i)
⊢ (Bornology.cobounded (Hamming β)).sets = {s | ∃ C, ∀ x ∈ sᶜ, ∀ y ∈ sᶜ, dist x y ≤ C}

Next tactic:
ext
instance : PseudoMetricSpace (Hamming β) where
  dist_self := by
    push_cast
    exact mod_cast hammingDist_self
  dist_comm := by
    push_cast
    exact mod_cast hammingDist_comm
  dist_triangle := by
    push_cast
    exact mod_cast hammingDist_triangle
  edist_dist _ _ := by exact ENNReal.coe_nnreal_eq _
  toUniformSpace := ⊥
  uniformity_dist := uniformity_dist_of_mem_uniformity _ _ fun s => by
    push_cast
    constructor
    · refine' fun hs => ⟨1, zero_lt_one, fun hab => _⟩
      rw_mod_cast [hammingDist_lt_one] at hab
      rw [ofHamming_inj, ← mem_idRel] at hab
      exact hs hab
    · rintro ⟨_, hε, hs⟩ ⟨_, _⟩ hab
      rw [mem_idRel] at hab
      rw [hab]
      refine' hs (lt_of_eq_of_lt _ hε)
      exact mod_cast hammingDist_self _
  toBornology := ⟨⊥, bot_le⟩
  cobounded_sets := by
    ext
    

Proof state:
case h
α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝¹ : Fintype ι
inst✝ : (i : ι) → DecidableEq (β i)
x✝ : Set (Hamming β)
⊢ x✝ ∈ (Bornology.cobounded (Hamming β)).sets ↔ x✝ ∈ {s | ∃ C, ∀ x ∈ sᶜ, ∀ y ∈ sᶜ, dist x y ≤ C}

Next tactic:
push_cast
instance : PseudoMetricSpace (Hamming β) where
  dist_self := by
    push_cast
    exact mod_cast hammingDist_self
  dist_comm := by
    push_cast
    exact mod_cast hammingDist_comm
  dist_triangle := by
    push_cast
    exact mod_cast hammingDist_triangle
  edist_dist _ _ := by exact ENNReal.coe_nnreal_eq _
  toUniformSpace := ⊥
  uniformity_dist := uniformity_dist_of_mem_uniformity _ _ fun s => by
    push_cast
    constructor
    · refine' fun hs => ⟨1, zero_lt_one, fun hab => _⟩
      rw_mod_cast [hammingDist_lt_one] at hab
      rw [ofHamming_inj, ← mem_idRel] at hab
      exact hs hab
    · rintro ⟨_, hε, hs⟩ ⟨_, _⟩ hab
      rw [mem_idRel] at hab
      rw [hab]
      refine' hs (lt_of_eq_of_lt _ hε)
      exact mod_cast hammingDist_self _
  toBornology := ⟨⊥, bot_le⟩
  cobounded_sets := by
    ext
    push_cast
    

Proof state:
case h
α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝¹ : Fintype ι
inst✝ : (i : ι) → DecidableEq (β i)
x✝ : Set (Hamming β)
⊢ x✝ ∈ (Bornology.cobounded (Hamming β)).sets ↔
    x✝ ∈ {s | ∃ C, ∀ x ∈ sᶜ, ∀ y ∈ sᶜ, ↑(hammingDist (ofHamming x) (ofHamming y)) ≤ C}

Next tactic:
refine' iff_of_true (Filter.mem_sets.mpr Filter.mem_bot) ⟨Fintype.card ι, fun _ _ _ _ => _⟩
instance : PseudoMetricSpace (Hamming β) where
  dist_self := by
    push_cast
    exact mod_cast hammingDist_self
  dist_comm := by
    push_cast
    exact mod_cast hammingDist_comm
  dist_triangle := by
    push_cast
    exact mod_cast hammingDist_triangle
  edist_dist _ _ := by exact ENNReal.coe_nnreal_eq _
  toUniformSpace := ⊥
  uniformity_dist := uniformity_dist_of_mem_uniformity _ _ fun s => by
    push_cast
    constructor
    · refine' fun hs => ⟨1, zero_lt_one, fun hab => _⟩
      rw_mod_cast [hammingDist_lt_one] at hab
      rw [ofHamming_inj, ← mem_idRel] at hab
      exact hs hab
    · rintro ⟨_, hε, hs⟩ ⟨_, _⟩ hab
      rw [mem_idRel] at hab
      rw [hab]
      refine' hs (lt_of_eq_of_lt _ hε)
      exact mod_cast hammingDist_self _
  toBornology := ⟨⊥, bot_le⟩
  cobounded_sets := by
    ext
    push_cast
    refine' iff_of_true (Filter.mem_sets.mpr Filter.mem_bot) ⟨Fintype.card ι, fun _ _ _ _ => _⟩
    

Proof state:
case h
α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝¹ : Fintype ι
inst✝ : (i : ι) → DecidableEq (β i)
x✝⁴ : Set (Hamming β)
x✝³ : Hamming β
x✝² : x✝³ ∈ x✝⁴ᶜ
x✝¹ : Hamming β
x✝ : x✝¹ ∈ x✝⁴ᶜ
⊢ ↑(hammingDist (ofHamming x✝³) (ofHamming x✝¹)) ≤ ↑(Fintype.card ι)

Next tactic:
exact mod_cast hammingDist_le_card_fintype
instance [∀ i, AddCommGroup (β i)] : NormedAddCommGroup (Hamming β) where
  dist_eq := by 

Proof state:
α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝² : Fintype ι
inst✝¹ : (i : ι) → DecidableEq (β i)
inst✝ : (i : ι) → AddCommGroup (β i)
⊢ ∀ (x y : Hamming β), dist x y = ‖x - y‖

Next tactic:
push_cast
instance [∀ i, AddCommGroup (β i)] : NormedAddCommGroup (Hamming β) where
  dist_eq := by push_cast; 

Proof state:
α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝² : Fintype ι
inst✝¹ : (i : ι) → DecidableEq (β i)
inst✝ : (i : ι) → AddCommGroup (β i)
⊢ ∀ (x y : Hamming β), ↑(hammingDist (ofHamming x) (ofHamming y)) = ↑(hammingNorm (ofHamming (x - y)))

Next tactic:
exact mod_cast hammingDist_eq_hammingNorm
/-- A version of `ExteriorAlgebra.ι` that maps directly into the graded structure. This is
primarily an auxiliary construction used to provide `ExteriorAlgebra.gradedAlgebra`. -/
-- porting note: protected
protected def GradedAlgebra.ι :
    M →ₗ[R] ⨁ i : ℕ, ↥(LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ i) :=
  DirectSum.lof R ℕ (fun i => ↥(LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ i)) 1 ∘ₗ
    (ι R).codRestrict _ fun m => by 

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
m : M
⊢ (ι R) m ∈ LinearMap.range (ι R) ^ 1

Next tactic:
simpa only [pow_one] using LinearMap.mem_range_self _ m
theorem GradedAlgebra.ι_apply (m : M) :
    GradedAlgebra.ι R M m =
      DirectSum.of (fun i : ℕ => ↥(LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ i)) 1
        ⟨ι R m, by 

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
m : M
⊢ (ι R) m ∈ LinearMap.range (ι R) ^ 1

Next tactic:
simpa only [pow_one] using LinearMap.mem_range_self _ m
theorem GradedAlgebra.ι_sq_zero (m : M) : GradedAlgebra.ι R M m * GradedAlgebra.ι R M m = 0 := by
  

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
m : M
⊢ (GradedAlgebra.ι R M) m * (GradedAlgebra.ι R M) m = 0

Next tactic:
rw [GradedAlgebra.ι_apply, DirectSum.of_mul_of]
theorem GradedAlgebra.ι_sq_zero (m : M) : GradedAlgebra.ι R M m * GradedAlgebra.ι R M m = 0 := by
  rw [GradedAlgebra.ι_apply, DirectSum.of_mul_of]
  

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
m : M
⊢ (DirectSum.of (fun i => ↥(LinearMap.range (ι R) ^ i)) (1 + 1))
      (GradedMonoid.GMul.mul { val := (ι R) m, property := (_ : (ι R) m ∈ LinearMap.range (ι R) ^ 1) }
        { val := (ι R) m, property := (_ : (ι R) m ∈ LinearMap.range (ι R) ^ 1) }) =
    0

Next tactic:
refine DFinsupp.single_eq_zero.mpr (Subtype.ext <| ExteriorAlgebra.ι_sq_zero _)
/-- `ExteriorAlgebra.GradedAlgebra.ι` lifted to exterior algebra. This is
primarily an auxiliary construction used to provide `ExteriorAlgebra.gradedAlgebra`. -/
def GradedAlgebra.liftι :
    ExteriorAlgebra R M →ₐ[R] ⨁ i : ℕ,
    (LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ i : Submodule R (ExteriorAlgebra R M)) :=
  lift R ⟨by 

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
⊢ M →ₗ[R] ⨁ (i : ℕ), ↥(LinearMap.range (ι R) ^ i)

Next tactic:
apply GradedAlgebra.ι R M
theorem GradedAlgebra.liftι_eq (i : ℕ)
    (x : (LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ i :
      Submodule R (ExteriorAlgebra R M))) :
    GradedAlgebra.liftι R M x =
    DirectSum.of (fun i =>
      ↥(LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ i :
      Submodule R (ExteriorAlgebra R M))) i x := by
  

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
i : ℕ
x : ↥(LinearMap.range (ι R) ^ i)
⊢ (liftι R M) ↑x = (DirectSum.of (fun i => ↥(LinearMap.range (ι R) ^ i)) i) x

Next tactic:
cases' x with x hx
theorem GradedAlgebra.liftι_eq (i : ℕ)
    (x : (LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ i :
      Submodule R (ExteriorAlgebra R M))) :
    GradedAlgebra.liftι R M x =
    DirectSum.of (fun i =>
      ↥(LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ i :
      Submodule R (ExteriorAlgebra R M))) i x := by
  cases' x with x hx
  

Proof state:
case mk
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
i : ℕ
x : ExteriorAlgebra R M
hx : x ∈ LinearMap.range (ι R) ^ i
⊢ (liftι R M) ↑{ val := x, property := hx } =
    (DirectSum.of (fun i => ↥(LinearMap.range (ι R) ^ i)) i) { val := x, property := hx }

Next tactic:
dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
theorem GradedAlgebra.liftι_eq (i : ℕ)
    (x : (LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ i :
      Submodule R (ExteriorAlgebra R M))) :
    GradedAlgebra.liftι R M x =
    DirectSum.of (fun i =>
      ↥(LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ i :
      Submodule R (ExteriorAlgebra R M))) i x := by
  cases' x with x hx
  dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
  -- Porting note: original statement was
  --  refine Submodule.pow_induction_on_left' _ (fun r => ?_) (fun x y i hx hy ihx ihy => ?_)
  --    (fun m hm i x hx ih => ?_) hx
  -- but it created invalid goals
  

Proof state:
case mk
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
i : ℕ
x : ExteriorAlgebra R M
hx : x ∈ LinearMap.range (ι R) ^ i
⊢ (liftι R M) x = (DirectSum.of (fun i => ↥(LinearMap.range (ι R) ^ i)) i) { val := x, property := hx }

Next tactic:
induction hx using Submodule.pow_induction_on_left' with
  | hr => simp_rw [AlgHom.commutes, DirectSum.algebraMap_apply]; rfl
  | hadd _ _ _ _ _ ihx ihy => simp_rw [AlgHom.map_add, ihx, ihy, ← map_add]; rfl
  | hmul _ hm _ _ _ ih =>
      obtain ⟨_, rfl⟩ := hm
      simp_rw [AlgHom.map_mul, ih, GradedAlgebra.liftι, lift_ι_apply, GradedAlgebra.ι_apply R M,
        DirectSum.of_mul_of]
      exact DirectSum.of_eq_of_gradedMonoid_eq (Sigma.subtype_ext (add_comm _ _) rfl)
theorem GradedAlgebra.liftι_eq (i : ℕ)
    (x : (LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ i :
      Submodule R (ExteriorAlgebra R M))) :
    GradedAlgebra.liftι R M x =
    DirectSum.of (fun i =>
      ↥(LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ i :
      Submodule R (ExteriorAlgebra R M))) i x := by
  cases' x with x hx
  dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
  -- Porting note: original statement was
  --  refine Submodule.pow_induction_on_left' _ (fun r => ?_) (fun x y i hx hy ihx ihy => ?_)
  --    (fun m hm i x hx ih => ?_) hx
  -- but it created invalid goals
  induction hx using Submodule.pow_induction_on_left' with
  

Proof state:
case mk.hr
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
i : ℕ
x : ExteriorAlgebra R M
r✝ : R
⊢ (liftι R M) ((algebraMap R (ExteriorAlgebra R M)) r✝) =
    (DirectSum.of (fun i => ↥(LinearMap.range (ι R) ^ i)) 0)
      { val := (algebraMap R (ExteriorAlgebra R M)) r✝, property := (_ : (algebraMap R (ExteriorAlgebra R M)) r✝ ∈ 1) }

Next tactic:
| hr => simp_rw [AlgHom.commutes, DirectSum.algebraMap_apply]; rfl
theorem GradedAlgebra.liftι_eq (i : ℕ)
    (x : (LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ i :
      Submodule R (ExteriorAlgebra R M))) :
    GradedAlgebra.liftι R M x =
    DirectSum.of (fun i =>
      ↥(LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ i :
      Submodule R (ExteriorAlgebra R M))) i x := by
  cases' x with x hx
  dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
  -- Porting note: original statement was
  --  refine Submodule.pow_induction_on_left' _ (fun r => ?_) (fun x y i hx hy ihx ihy => ?_)
  --    (fun m hm i x hx ih => ?_) hx
  -- but it created invalid goals
  induction hx using Submodule.pow_induction_on_left' with
  | hr => 

Proof state:
case mk.hr
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
i : ℕ
x : ExteriorAlgebra R M
r✝ : R
⊢ (liftι R M) ((algebraMap R (ExteriorAlgebra R M)) r✝) =
    (DirectSum.of (fun i => ↥(LinearMap.range (ι R) ^ i)) 0)
      { val := (algebraMap R (ExteriorAlgebra R M)) r✝, property := (_ : (algebraMap R (ExteriorAlgebra R M)) r✝ ∈ 1) }

Next tactic:
simp_rw [AlgHom.commutes, DirectSum.algebraMap_apply]
theorem GradedAlgebra.liftι_eq (i : ℕ)
    (x : (LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ i :
      Submodule R (ExteriorAlgebra R M))) :
    GradedAlgebra.liftι R M x =
    DirectSum.of (fun i =>
      ↥(LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ i :
      Submodule R (ExteriorAlgebra R M))) i x := by
  cases' x with x hx
  dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
  -- Porting note: original statement was
  --  refine Submodule.pow_induction_on_left' _ (fun r => ?_) (fun x y i hx hy ihx ihy => ?_)
  --    (fun m hm i x hx ih => ?_) hx
  -- but it created invalid goals
  induction hx using Submodule.pow_induction_on_left' with
  | hr => simp_rw [AlgHom.commutes, DirectSum.algebraMap_apply]; 

Proof state:
case mk.hr
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
i : ℕ
x : ExteriorAlgebra R M
r✝ : R
⊢ (DirectSum.of (fun i => ↥(LinearMap.range (ι R) ^ i)) 0) (DirectSum.GAlgebra.toFun r✝) =
    (DirectSum.of (fun i => ↥(LinearMap.range (ι R) ^ i)) 0)
      { val := (algebraMap R (ExteriorAlgebra R M)) r✝, property := (_ : (algebraMap R (ExteriorAlgebra R M)) r✝ ∈ 1) }

Next tactic:
rfl