l3lab/ntp-mathlib huggingface dataset:
theorem mapRange_smul {_ : Monoid R} [AddMonoid M] [DistribMulAction R M] [AddMonoid N]
    [DistribMulAction R N] {f : M → N} {hf : f 0 = 0} (c : R) (v : α →₀ M)
    (hsmul : ∀ x, f (c • x) = c • f x) : mapRange f hf (c • v) = c • mapRange f hf v := by
  erw [← mapRange_comp]
  have : f ∘ (c • ·) = (c • ·) ∘ f := funext hsmul
  simp_rw [this]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
x✝ : Monoid R
inst✝³ : AddMonoid M
inst✝² : DistribMulAction R M
inst✝¹ : AddMonoid N
inst✝ : DistribMulAction R N
f : M → N
hf : f 0 = 0
c : R
v : α →₀ M
hsmul : ∀ (x : M), f (c • x) = c • f x
this : (f ∘ fun x => c • x) = (fun x => c • x) ∘ f
⊢ mapRange ((fun x => c • x) ∘ f) (_ : ((fun x => c • x) ∘ f) 0 = 0) v = c • mapRange f hf v
case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
x✝ : Monoid R
inst✝³ : AddMonoid M
inst✝² : DistribMulAction R M
inst✝¹ : AddMonoid N
inst✝ : DistribMulAction R N
f : M → N
hf : f 0 = 0
c : R
v : α →₀ M
hsmul : ∀ (x : M), f (c • x) = c • f x
⊢ (f ∘ fun x => c • x) 0 = 0

Next tactic:
apply mapRange_comp
theorem mapRange_smul {_ : Monoid R} [AddMonoid M] [DistribMulAction R M] [AddMonoid N]
    [DistribMulAction R N] {f : M → N} {hf : f 0 = 0} (c : R) (v : α →₀ M)
    (hsmul : ∀ x, f (c • x) = c • f x) : mapRange f hf (c • v) = c • mapRange f hf v := by
  erw [← mapRange_comp]
  have : f ∘ (c • ·) = (c • ·) ∘ f := funext hsmul
  simp_rw [this]
  apply mapRange_comp
  

Proof state:
case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
x✝ : Monoid R
inst✝³ : AddMonoid M
inst✝² : DistribMulAction R M
inst✝¹ : AddMonoid N
inst✝ : DistribMulAction R N
f : M → N
hf : f 0 = 0
c : R
v : α →₀ M
hsmul : ∀ (x : M), f (c • x) = c • f x
⊢ (f ∘ fun x => c • x) 0 = 0

Next tactic:
simp only [Function.comp_apply, smul_zero, hf]
theorem smul_single_one [Semiring R] (a : α) (b : R) : b • single a (1 : R) = single a b := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Semiring R
a : α
b : R
⊢ (b • fun₀ | a => 1) = fun₀ | a => b

Next tactic:
rw [smul_single, smul_eq_mul, mul_one]
theorem comapDomain_smul [AddMonoid M] [Monoid R] [DistribMulAction R M] {f : α → β} (r : R)
    (v : β →₀ M) (hfv : Set.InjOn f (f ⁻¹' ↑v.support))
    (hfrv : Set.InjOn f (f ⁻¹' ↑(r • v).support) :=
      hfv.mono <| Set.preimage_mono <| Finset.coe_subset.mpr support_smul) :
    comapDomain f (r • v) hfrv = r • comapDomain f v hfv := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝² : AddMonoid M
inst✝¹ : Monoid R
inst✝ : DistribMulAction R M
f : α → β
r : R
v : β →₀ M
hfv : Set.InjOn f (f ⁻¹' ↑v.support)
hfrv : optParam (Set.InjOn f (f ⁻¹' ↑(r • v).support)) (_ : Set.InjOn f (f ⁻¹' ↑(r • v).support))
⊢ comapDomain f (r • v) hfrv = r • comapDomain f v hfv

Next tactic:
ext
theorem comapDomain_smul [AddMonoid M] [Monoid R] [DistribMulAction R M] {f : α → β} (r : R)
    (v : β →₀ M) (hfv : Set.InjOn f (f ⁻¹' ↑v.support))
    (hfrv : Set.InjOn f (f ⁻¹' ↑(r • v).support) :=
      hfv.mono <| Set.preimage_mono <| Finset.coe_subset.mpr support_smul) :
    comapDomain f (r • v) hfrv = r • comapDomain f v hfv := by
  ext
  

Proof state:
case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝² : AddMonoid M
inst✝¹ : Monoid R
inst✝ : DistribMulAction R M
f : α → β
r : R
v : β →₀ M
hfv : Set.InjOn f (f ⁻¹' ↑v.support)
hfrv : optParam (Set.InjOn f (f ⁻¹' ↑(r • v).support)) (_ : Set.InjOn f (f ⁻¹' ↑(r • v).support))
a✝ : α
⊢ (comapDomain f (r • v) hfrv) a✝ = (r • comapDomain f v hfv) a✝

Next tactic:
rfl
/-- `Finsupp.single` as a `DistribMulActionHom`.

See also `Finsupp.lsingle` for the version as a linear map. -/
def DistribMulActionHom.single (a : α) : M →+[R] α →₀ M :=
  { singleAddHom a with
    map_smul' := fun k m => by
      

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : AddCommMonoid N
inst✝¹ : DistribMulAction R M
inst✝ : DistribMulAction R N
a : α
src✝ : M →+ α →₀ M := singleAddHom a
k : R
m : M
⊢ ZeroHom.toFun (↑src✝) (k • m) = k • ZeroHom.toFun (↑src✝) m

Next tactic:
simp only
/-- `Finsupp.single` as a `DistribMulActionHom`.

See also `Finsupp.lsingle` for the version as a linear map. -/
def DistribMulActionHom.single (a : α) : M →+[R] α →₀ M :=
  { singleAddHom a with
    map_smul' := fun k m => by
      simp only
      

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : AddCommMonoid N
inst✝¹ : DistribMulAction R M
inst✝ : DistribMulAction R N
a : α
src✝ : M →+ α →₀ M := singleAddHom a
k : R
m : M
⊢ ZeroHom.toFun (↑(singleAddHom a)) (k • m) = k • ZeroHom.toFun (↑(singleAddHom a)) m

Next tactic:
show singleAddHom a (k • m) = k • singleAddHom a m
/-- `Finsupp.single` as a `DistribMulActionHom`.

See also `Finsupp.lsingle` for the version as a linear map. -/
def DistribMulActionHom.single (a : α) : M →+[R] α →₀ M :=
  { singleAddHom a with
    map_smul' := fun k m => by
      simp only
      show singleAddHom a (k • m) = k • singleAddHom a m
      

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : AddCommMonoid N
inst✝¹ : DistribMulAction R M
inst✝ : DistribMulAction R N
a : α
src✝ : M →+ α →₀ M := singleAddHom a
k : R
m : M
⊢ (singleAddHom a) (k • m) = k • (singleAddHom a) m

Next tactic:
change Finsupp.single a (k • m) = k • (Finsupp.single a m)
/-- `Finsupp.single` as a `DistribMulActionHom`.

See also `Finsupp.lsingle` for the version as a linear map. -/
def DistribMulActionHom.single (a : α) : M →+[R] α →₀ M :=
  { singleAddHom a with
    map_smul' := fun k m => by
      simp only
      show singleAddHom a (k • m) = k • singleAddHom a m
      change Finsupp.single a (k • m) = k • (Finsupp.single a m)
      -- porting note: because `singleAddHom_apply` is missing
      

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : AddCommMonoid N
inst✝¹ : DistribMulAction R M
inst✝ : DistribMulAction R N
a : α
src✝ : M →+ α →₀ M := singleAddHom a
k : R
m : M
⊢ (fun₀ | a => k • m) = k • fun₀ | a => m

Next tactic:
simp only [smul_single]
/-- Given an `AddCommMonoid M` and `s : Set α`, `restrictSupportEquiv s M` is the `Equiv`
between the subtype of finitely supported functions with support contained in `s` and
the type of finitely supported functions from `s`. -/
def restrictSupportEquiv (s : Set α) (M : Type*) [AddCommMonoid M] :
    { f : α →₀ M // ↑f.support ⊆ s } ≃ (s →₀ M) where
  toFun f := subtypeDomain (fun x => x ∈ s) f.1
  invFun f :=
    ⟨f.embDomain <| Embedding.subtype _, by
      

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M✝ : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
s : Set α
M : Type u_13
inst✝ : AddCommMonoid M
f : ↑s →₀ M
⊢ ↑(embDomain (Embedding.subtype fun x => x ∈ s) f).support ⊆ s

Next tactic:
rw [support_embDomain, Finset.coe_map, Set.image_subset_iff]
/-- Given an `AddCommMonoid M` and `s : Set α`, `restrictSupportEquiv s M` is the `Equiv`
between the subtype of finitely supported functions with support contained in `s` and
the type of finitely supported functions from `s`. -/
def restrictSupportEquiv (s : Set α) (M : Type*) [AddCommMonoid M] :
    { f : α →₀ M // ↑f.support ⊆ s } ≃ (s →₀ M) where
  toFun f := subtypeDomain (fun x => x ∈ s) f.1
  invFun f :=
    ⟨f.embDomain <| Embedding.subtype _, by
      rw [support_embDomain, Finset.coe_map, Set.image_subset_iff]
      

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M✝ : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
s : Set α
M : Type u_13
inst✝ : AddCommMonoid M
f : ↑s →₀ M
⊢ ↑f.support ⊆ ⇑(Embedding.subtype fun x => x ∈ s) ⁻¹' s

Next tactic:
exact fun x _ => x.2
/-- Given an `AddCommMonoid M` and `s : Set α`, `restrictSupportEquiv s M` is the `Equiv`
between the subtype of finitely supported functions with support contained in `s` and
the type of finitely supported functions from `s`. -/
def restrictSupportEquiv (s : Set α) (M : Type*) [AddCommMonoid M] :
    { f : α →₀ M // ↑f.support ⊆ s } ≃ (s →₀ M) where
  toFun f := subtypeDomain (fun x => x ∈ s) f.1
  invFun f :=
    ⟨f.embDomain <| Embedding.subtype _, by
      rw [support_embDomain, Finset.coe_map, Set.image_subset_iff]
      exact fun x _ => x.2⟩
  left_inv := by
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M✝ : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
s : Set α
M : Type u_13
inst✝ : AddCommMonoid M
⊢ LeftInverse
    (fun f =>
      { val := embDomain (Embedding.subtype fun x => x ∈ s) f,
        property := (_ : ↑(embDomain (Embedding.subtype fun x => x ∈ s) f).support ⊆ s) })
    fun f => subtypeDomain (fun x => x ∈ s) ↑f

Next tactic:
rintro ⟨f, hf⟩
/-- Given an `AddCommMonoid M` and `s : Set α`, `restrictSupportEquiv s M` is the `Equiv`
between the subtype of finitely supported functions with support contained in `s` and
the type of finitely supported functions from `s`. -/
def restrictSupportEquiv (s : Set α) (M : Type*) [AddCommMonoid M] :
    { f : α →₀ M // ↑f.support ⊆ s } ≃ (s →₀ M) where
  toFun f := subtypeDomain (fun x => x ∈ s) f.1
  invFun f :=
    ⟨f.embDomain <| Embedding.subtype _, by
      rw [support_embDomain, Finset.coe_map, Set.image_subset_iff]
      exact fun x _ => x.2⟩
  left_inv := by
    rintro ⟨f, hf⟩
    

Proof state:
case mk
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M✝ : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
s : Set α
M : Type u_13
inst✝ : AddCommMonoid M
f : α →₀ M
hf : ↑f.support ⊆ s
⊢ (fun f =>
        { val := embDomain (Embedding.subtype fun x => x ∈ s) f,
          property := (_ : ↑(embDomain (Embedding.subtype fun x => x ∈ s) f).support ⊆ s) })
      ((fun f => subtypeDomain (fun x => x ∈ s) ↑f) { val := f, property := hf }) =
    { val := f, property := hf }

Next tactic:
ext a
/-- Given an `AddCommMonoid M` and `s : Set α`, `restrictSupportEquiv s M` is the `Equiv`
between the subtype of finitely supported functions with support contained in `s` and
the type of finitely supported functions from `s`. -/
def restrictSupportEquiv (s : Set α) (M : Type*) [AddCommMonoid M] :
    { f : α →₀ M // ↑f.support ⊆ s } ≃ (s →₀ M) where
  toFun f := subtypeDomain (fun x => x ∈ s) f.1
  invFun f :=
    ⟨f.embDomain <| Embedding.subtype _, by
      rw [support_embDomain, Finset.coe_map, Set.image_subset_iff]
      exact fun x _ => x.2⟩
  left_inv := by
    rintro ⟨f, hf⟩
    ext a
    

Proof state:
case mk.a.h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M✝ : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
s : Set α
M : Type u_13
inst✝ : AddCommMonoid M
f : α →₀ M
hf : ↑f.support ⊆ s
a : α
⊢ ↑((fun f =>
            { val := embDomain (Embedding.subtype fun x => x ∈ s) f,
              property := (_ : ↑(embDomain (Embedding.subtype fun x => x ∈ s) f).support ⊆ s) })
          ((fun f => subtypeDomain (fun x => x ∈ s) ↑f) { val := f, property := hf }))
      a =
    ↑{ val := f, property := hf } a

Next tactic:
by_cases h : a ∈ s
/-- Given an `AddCommMonoid M` and `s : Set α`, `restrictSupportEquiv s M` is the `Equiv`
between the subtype of finitely supported functions with support contained in `s` and
the type of finitely supported functions from `s`. -/
def restrictSupportEquiv (s : Set α) (M : Type*) [AddCommMonoid M] :
    { f : α →₀ M // ↑f.support ⊆ s } ≃ (s →₀ M) where
  toFun f := subtypeDomain (fun x => x ∈ s) f.1
  invFun f :=
    ⟨f.embDomain <| Embedding.subtype _, by
      rw [support_embDomain, Finset.coe_map, Set.image_subset_iff]
      exact fun x _ => x.2⟩
  left_inv := by
    rintro ⟨f, hf⟩
    ext a
    by_cases h : a ∈ s
    · 

Proof state:
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M✝ : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
s : Set α
M : Type u_13
inst✝ : AddCommMonoid M
f : α →₀ M
hf : ↑f.support ⊆ s
a : α
h : a ∈ s
⊢ ↑((fun f =>
            { val := embDomain (Embedding.subtype fun x => x ∈ s) f,
              property := (_ : ↑(embDomain (Embedding.subtype fun x => x ∈ s) f).support ⊆ s) })
          ((fun f => subtypeDomain (fun x => x ∈ s) ↑f) { val := f, property := hf }))
      a =
    ↑{ val := f, property := hf } a

Next tactic:
lift a to s using h
/-- Given an `AddCommMonoid M` and `s : Set α`, `restrictSupportEquiv s M` is the `Equiv`
between the subtype of finitely supported functions with support contained in `s` and
the type of finitely supported functions from `s`. -/
def restrictSupportEquiv (s : Set α) (M : Type*) [AddCommMonoid M] :
    { f : α →₀ M // ↑f.support ⊆ s } ≃ (s →₀ M) where
  toFun f := subtypeDomain (fun x => x ∈ s) f.1
  invFun f :=
    ⟨f.embDomain <| Embedding.subtype _, by
      rw [support_embDomain, Finset.coe_map, Set.image_subset_iff]
      exact fun x _ => x.2⟩
  left_inv := by
    rintro ⟨f, hf⟩
    ext a
    by_cases h : a ∈ s
    · lift a to s using h
      

Proof state:
case pos.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M✝ : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
s : Set α
M : Type u_13
inst✝ : AddCommMonoid M
f : α →₀ M
hf : ↑f.support ⊆ s
a : { x // x ∈ s }
⊢ ↑((fun f =>
            { val := embDomain (Embedding.subtype fun x => x ∈ s) f,
              property := (_ : ↑(embDomain (Embedding.subtype fun x => x ∈ s) f).support ⊆ s) })
          ((fun f => subtypeDomain (fun x => x ∈ s) ↑f) { val := f, property := hf }))
      ↑a =
    ↑{ val := f, property := hf } ↑a

Next tactic:
exact embDomain_apply _ _ _
/-- Given an `AddCommMonoid M` and `s : Set α`, `restrictSupportEquiv s M` is the `Equiv`
between the subtype of finitely supported functions with support contained in `s` and
the type of finitely supported functions from `s`. -/
def restrictSupportEquiv (s : Set α) (M : Type*) [AddCommMonoid M] :
    { f : α →₀ M // ↑f.support ⊆ s } ≃ (s →₀ M) where
  toFun f := subtypeDomain (fun x => x ∈ s) f.1
  invFun f :=
    ⟨f.embDomain <| Embedding.subtype _, by
      rw [support_embDomain, Finset.coe_map, Set.image_subset_iff]
      exact fun x _ => x.2⟩
  left_inv := by
    rintro ⟨f, hf⟩
    ext a
    by_cases h : a ∈ s
    · lift a to s using h
      exact embDomain_apply _ _ _
    

Proof state:
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M✝ : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
s : Set α
M : Type u_13
inst✝ : AddCommMonoid M
f : α →₀ M
hf : ↑f.support ⊆ s
a : α
h : a ∉ s
⊢ ↑((fun f =>
            { val := embDomain (Embedding.subtype fun x => x ∈ s) f,
              property := (_ : ↑(embDomain (Embedding.subtype fun x => x ∈ s) f).support ⊆ s) })
          ((fun f => subtypeDomain (fun x => x ∈ s) ↑f) { val := f, property := hf }))
      a =
    ↑{ val := f, property := hf } a

Next tactic:
rw [embDomain_notin_range, eq_comm, ← Finsupp.not_mem_support_iff]
/-- Given an `AddCommMonoid M` and `s : Set α`, `restrictSupportEquiv s M` is the `Equiv`
between the subtype of finitely supported functions with support contained in `s` and
the type of finitely supported functions from `s`. -/
def restrictSupportEquiv (s : Set α) (M : Type*) [AddCommMonoid M] :
    { f : α →₀ M // ↑f.support ⊆ s } ≃ (s →₀ M) where
  toFun f := subtypeDomain (fun x => x ∈ s) f.1
  invFun f :=
    ⟨f.embDomain <| Embedding.subtype _, by
      rw [support_embDomain, Finset.coe_map, Set.image_subset_iff]
      exact fun x _ => x.2⟩
  left_inv := by
    rintro ⟨f, hf⟩
    ext a
    by_cases h : a ∈ s
    · lift a to s using h
      exact embDomain_apply _ _ _
    rw [embDomain_notin_range, eq_comm, ← Finsupp.not_mem_support_iff]
    · 

Proof state:
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M✝ : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
s : Set α
M : Type u_13
inst✝ : AddCommMonoid M
f : α →₀ M
hf : ↑f.support ⊆ s
a : α
h : a ∉ s
⊢ a ∉ (↑{ val := f, property := hf }).support

Next tactic:
exact fun hs => h <| hf hs
/-- Given an `AddCommMonoid M` and `s : Set α`, `restrictSupportEquiv s M` is the `Equiv`
between the subtype of finitely supported functions with support contained in `s` and
the type of finitely supported functions from `s`. -/
def restrictSupportEquiv (s : Set α) (M : Type*) [AddCommMonoid M] :
    { f : α →₀ M // ↑f.support ⊆ s } ≃ (s →₀ M) where
  toFun f := subtypeDomain (fun x => x ∈ s) f.1
  invFun f :=
    ⟨f.embDomain <| Embedding.subtype _, by
      rw [support_embDomain, Finset.coe_map, Set.image_subset_iff]
      exact fun x _ => x.2⟩
  left_inv := by
    rintro ⟨f, hf⟩
    ext a
    by_cases h : a ∈ s
    · lift a to s using h
      exact embDomain_apply _ _ _
    rw [embDomain_notin_range, eq_comm, ← Finsupp.not_mem_support_iff]
    · exact fun hs => h <| hf hs
    · 

Proof state:
case neg.h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M✝ : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
s : Set α
M : Type u_13
inst✝ : AddCommMonoid M
f : α →₀ M
hf : ↑f.support ⊆ s
a : α
h : a ∉ s
⊢ a ∉ Set.range ⇑(Embedding.subtype fun x => x ∈ s)

Next tactic:
simp [h]
/-- Given `AddCommMonoid M` and `e : α ≃ β`, `domCongr e` is the corresponding `Equiv` between
`α →₀ M` and `β →₀ M`.

This is `Finsupp.equivCongrLeft` as an `AddEquiv`. -/
@[simps apply]
protected def domCongr [AddCommMonoid M] (e : α ≃ β) : (α →₀ M) ≃+ (β →₀ M)
    where
  toFun := equivMapDomain e
  invFun := equivMapDomain e.symm
  left_inv v := by
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddCommMonoid M
e : α ≃ β
v : α →₀ M
⊢ equivMapDomain e.symm (equivMapDomain e v) = v

Next tactic:
simp only [← equivMapDomain_trans, Equiv.self_trans_symm]
/-- Given `AddCommMonoid M` and `e : α ≃ β`, `domCongr e` is the corresponding `Equiv` between
`α →₀ M` and `β →₀ M`.

This is `Finsupp.equivCongrLeft` as an `AddEquiv`. -/
@[simps apply]
protected def domCongr [AddCommMonoid M] (e : α ≃ β) : (α →₀ M) ≃+ (β →₀ M)
    where
  toFun := equivMapDomain e
  invFun := equivMapDomain e.symm
  left_inv v := by
    simp only [← equivMapDomain_trans, Equiv.self_trans_symm]
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddCommMonoid M
e : α ≃ β
v : α →₀ M
⊢ equivMapDomain (Equiv.refl α) v = v

Next tactic:
exact equivMapDomain_refl _
/-- Given `AddCommMonoid M` and `e : α ≃ β`, `domCongr e` is the corresponding `Equiv` between
`α →₀ M` and `β →₀ M`.

This is `Finsupp.equivCongrLeft` as an `AddEquiv`. -/
@[simps apply]
protected def domCongr [AddCommMonoid M] (e : α ≃ β) : (α →₀ M) ≃+ (β →₀ M)
    where
  toFun := equivMapDomain e
  invFun := equivMapDomain e.symm
  left_inv v := by
    simp only [← equivMapDomain_trans, Equiv.self_trans_symm]
    exact equivMapDomain_refl _
  right_inv := by
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddCommMonoid M
e : α ≃ β
⊢ Function.RightInverse (equivMapDomain e.symm) (equivMapDomain e)

Next tactic:
intro v
/-- Given `AddCommMonoid M` and `e : α ≃ β`, `domCongr e` is the corresponding `Equiv` between
`α →₀ M` and `β →₀ M`.

This is `Finsupp.equivCongrLeft` as an `AddEquiv`. -/
@[simps apply]
protected def domCongr [AddCommMonoid M] (e : α ≃ β) : (α →₀ M) ≃+ (β →₀ M)
    where
  toFun := equivMapDomain e
  invFun := equivMapDomain e.symm
  left_inv v := by
    simp only [← equivMapDomain_trans, Equiv.self_trans_symm]
    exact equivMapDomain_refl _
  right_inv := by
    intro v
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddCommMonoid M
e : α ≃ β
v : β →₀ M
⊢ equivMapDomain e (equivMapDomain e.symm v) = v

Next tactic:
simp only [← equivMapDomain_trans, Equiv.symm_trans_self]
/-- Given `AddCommMonoid M` and `e : α ≃ β`, `domCongr e` is the corresponding `Equiv` between
`α →₀ M` and `β →₀ M`.

This is `Finsupp.equivCongrLeft` as an `AddEquiv`. -/
@[simps apply]
protected def domCongr [AddCommMonoid M] (e : α ≃ β) : (α →₀ M) ≃+ (β →₀ M)
    where
  toFun := equivMapDomain e
  invFun := equivMapDomain e.symm
  left_inv v := by
    simp only [← equivMapDomain_trans, Equiv.self_trans_symm]
    exact equivMapDomain_refl _
  right_inv := by
    intro v
    simp only [← equivMapDomain_trans, Equiv.symm_trans_self]
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddCommMonoid M
e : α ≃ β
v : β →₀ M
⊢ equivMapDomain (Equiv.refl β) v = v

Next tactic:
exact equivMapDomain_refl _
/-- Given `AddCommMonoid M` and `e : α ≃ β`, `domCongr e` is the corresponding `Equiv` between
`α →₀ M` and `β →₀ M`.

This is `Finsupp.equivCongrLeft` as an `AddEquiv`. -/
@[simps apply]
protected def domCongr [AddCommMonoid M] (e : α ≃ β) : (α →₀ M) ≃+ (β →₀ M)
    where
  toFun := equivMapDomain e
  invFun := equivMapDomain e.symm
  left_inv v := by
    simp only [← equivMapDomain_trans, Equiv.self_trans_symm]
    exact equivMapDomain_refl _
  right_inv := by
    intro v
    simp only [← equivMapDomain_trans, Equiv.symm_trans_self]
    exact equivMapDomain_refl _
  map_add' a b := by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddCommMonoid M
e : α ≃ β
a b : α →₀ M
⊢ Equiv.toFun
      { toFun := equivMapDomain e, invFun := equivMapDomain e.symm,
        left_inv := (_ : ∀ (v : α →₀ M), equivMapDomain e.symm (equivMapDomain e v) = v),
        right_inv := (_ : ∀ (v : β →₀ M), equivMapDomain e (equivMapDomain e.symm v) = v) }
      (a + b) =
    Equiv.toFun
        { toFun := equivMapDomain e, invFun := equivMapDomain e.symm,
          left_inv := (_ : ∀ (v : α →₀ M), equivMapDomain e.symm (equivMapDomain e v) = v),
          right_inv := (_ : ∀ (v : β →₀ M), equivMapDomain e (equivMapDomain e.symm v) = v) }
        a +
      Equiv.toFun
        { toFun := equivMapDomain e, invFun := equivMapDomain e.symm,
          left_inv := (_ : ∀ (v : α →₀ M), equivMapDomain e.symm (equivMapDomain e v) = v),
          right_inv := (_ : ∀ (v : β →₀ M), equivMapDomain e (equivMapDomain e.symm v) = v) }
        b

Next tactic:
simp only [equivMapDomain_eq_mapDomain]