Skip to content

Commit

Permalink
chore(data/finsupp/basic): Add single_of_single_apply (#5219)
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-wieser committed Dec 4, 2020
1 parent 8a9a5d3 commit 0afd3a0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/data/finsupp/basic.lean
Expand Up @@ -200,6 +200,16 @@ begin
{ rw [single_eq_of_ne h, zero_apply] }
end

lemma single_of_single_apply (a a' : α) (b : M) :
single a ((single a' b) a) = single a' (single a' b) a :=
begin
rw [single_apply, single_apply],
ext,
split_ifs,
{ rw h, },
{ rw [zero_apply, single_apply, if_t_t], },
end

lemma support_single_ne_zero (hb : b ≠ 0) : (single a b).support = {a} :=
if_neg hb

Expand Down

0 comments on commit 0afd3a0

Please sign in to comment.