Skip to content

Commit

Permalink
chore(data/support): zero function has empty support (#5275)
Browse files Browse the repository at this point in the history
  • Loading branch information
urkud committed Dec 8, 2020
1 parent 35f0862 commit 3f4829c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/data/support.lean
Expand Up @@ -45,6 +45,12 @@ forall_congr $ λ x, by classical; exact not_imp_comm
support f = ∅ ↔ f = 0 :=
by { simp_rw [← subset_empty_iff, support_subset_iff', funext_iff], simp }

@[simp] lemma support_zero' [has_zero A] : support (0 : α → A) = ∅ :=
support_eq_empty_iff.2 rfl

@[simp] lemma support_zero [has_zero A] : support (λ x : α, (0 : A)) = ∅ :=
support_zero'

lemma support_binop_subset [has_zero A] (op : A → A → A) (op0 : op 0 0 = 0) (f g : α → A) :
support (λ x, op (f x) (g x)) ⊆ support f ∪ support g :=
λ x hx, classical.by_cases
Expand Down

0 comments on commit 3f4829c

Please sign in to comment.